Ranking and filtering comments based on impression calculations

ABSTRACT

In one embodiment, a method includes retrieving a plurality of comments associated with a content object, determining a score for each of the comments, where the score is based on one or more signals associated with the comment, and where the score is further based on a qualitative analysis of each of one or more impressions related to the comment, and wherein each of the impressions comprises an interaction by a historical user with the comment, ordering the comments based on the respective scores, presenting one or more of the ordered comments to a target user. The qualitative analysis may determine a category of interaction for the impression, the score may be based at least in part on the category of interaction, and the category of interaction may include user input related to the comment, such as a reply to the comment.

TECHNICAL FIELD

This disclosure generally relates to ranking and filtering content itemsin a social-networking environment.

BACKGROUND

A social-networking system, which may include a social-networkingwebsite, may enable its users (such as persons or organizations) tointeract with it and with each other through it. The social-networkingsystem may, with input from a user, create and store in thesocial-networking system a user profile associated with the user. Theuser profile may include demographic information, communication-channelinformation, and information on personal interests of the user. Thesocial-networking system may also, with input from a user, create andstore a record of relationships of the user with other users of thesocial-networking system, as well as provide services (e.g., wall posts,photo-sharing, event organization, messaging, games, or advertisements)to facilitate social interaction between or among users.

The social-networking system may send over one or more networks contentor messages related to its services to a mobile or other computingdevice of a user. A user may also install software applications on amobile or other computing device of the user for accessing a userprofile of the user and other data within the social-networking system.The social-networking system may generate a personalized set of contentobjects to display to a user, such as a newsfeed of aggregated storiesof other users connected to the user.

SUMMARY OF PARTICULAR EMBODIMENTS

Content on a social-network page, such as a post or article, can havenumerous user-contributed comments, some of which may be of greaterinterest to a viewing user than others. In particular embodiments, theuser experience for reading and posting comments may be improved byidentifying comments that are likely to be of interest to viewing users,and displaying those comments in a prominent location, such as near thetop of the comment list. The comments of interest may be, for example,comments that people are reading and replying to, that provideinteresting context for and information relevant to the post, arewell-written, are written by authors known to write good comments, andso on. Comments of interest may be identified by determining scores forthe comments based on signal values, which may quantify features of thecomments and/or features of other entities in the social-networkingsystem, such as posts or users. The comments of interest may bepresented in an order according to their scores, with thehighest-scoring comments being presented at the top of the comment list.The comments may also be filtered, in which case comments that satisfyfiltering criteria, e.g., having scores above a threshold value, arepresented.

The signal values may be related to aspects of comments, users, and userinteractions. In particular embodiments, the signal values may bedetermined based on the author and content of the comments, the audienceof users who view and interact with the comments (such as the user'sfriends), labelling of the comments by a text classifier, users'interactions with social-network news feeds, impression calculationsinvolving interactions by historical users with the comments, and otheraspects of the social-networking environment that involve interactionswith comments and/or users. One or more of these signals may be used todetermine a score for each comment. When multiple signals are used for asingle comment, the comment's score may be determined as an average ofthe signal values.

In particular embodiments, the comments associated with a post may beranked and filtered based on author-related and content-related featuresof the comments. A score for each comment may be computed as a sum ofthe signal values for that comment, and the signal values for eachcomment may be determined based on the author-related andcontent-related features of the comment. Author-related features may beused, for example, to generate an author reputation signal based on anumber of times content attributed to the author has been (a) liked, (b)hidden, (c) marked as spam, or (d) replied to within a specified periodof time. Content-related signals may include an originality level of thecomment text, which may be based on how similar the text is to text in acorpus of text associated with the online social network. Agrammar-quality signal may be based on the quality of grammar in acomment's text. A valid URL signal may be set to a positive value if thecomment contains a valid URL, or zero otherwise. A relevant text signalmay be based on a relevance comparison between text of the post orarticle and text of the comment. A promotional signal may be based on alevel of promotional content identified in the comment. A text entropysignal may be based on an amount of meaningful content in the comment.

In particular embodiments, comments social-network pages may be rankedand filtered based on audience interactions with the comment. Forexample, a score may be determined for each of the comments. The scoremay be based on one or more signals, the signals being associated withthe comment and related to interactions by audience members with thecomment. These audience interactions may include how users in theauthor's social network or admins have been interacting with thecomment, and the author's responses to those interactions.

In particular embodiments, comments may be ranked and filtered forpresentation to target user based on a history of user interactions withthe target user's newsfeed. The user interactions may include liking,posting, or sharing a comment on the target user's newsfeed. Marking acomment as disliked, spam, or hidden, friending, unfriending, following,or unfollowing another user are also examples of user interactions witha newsfeed. Each interaction that relates to a comment may be evaluatedto determine a numeric signal value, e.g., a positive or negative valueto be added to the comment's ranking score. The sign and magnitude ofthe value may be determined by a signal that is selected based on thetype of interaction. The signal may specify a static value or a dynamicrule that can generate a value based on the specific interaction. Forexample, a user interaction of liking a comment may statically set thesignal value to a positive value, e.g., 0.1. A user interaction ofmarking a comment as spam may statically set the signal value to anegative value, e.g., −0.2. The signal values determined based on feedinteractions related to a comment may be added to the comment's rankingscore to influence the position of the comment in the list produced bythe ranking and filtering operations.

In particular embodiments, a labelling technique may be used to identifyone or more labels that describe to the content of a comment, and adjustthe comment's ranking among a list of comments based on the identifiedlabels. The labelling technique may use a comment classifier thatidentifies labels under which the comment may be classified, such asAnecdotal, Eloquent, Descriptive, Promotional, and others. For example,a comment may be labeled promotional if it contains content deemedpromotional, e.g., “Like me”, “Follow me”, etc. A comment may be labeledEloquent if it contains good grammar. The ranking of comments may bebased on ranking scores associated with each comment, and a comment'sranking score may be a sum of the signal values that are based on thecomment. Each of the labels identified for a comment may be mapped to apositive or negative signal value. Labels that denote positivequalities, such as the Eloquent and Descriptive labels, are mapped topositive signal values that contribute to raising the comment's rankingscore. Labels that denote negative qualities, such as the Promotionallabel, are mapped to negative signal values that contribute to loweringthe comment's ranking score. Thus the signal value(s) used to score acomment may be based on the label(s) identified for the comment, and onother factors such as a degree to which the label applies to thecomment, which may be based on a confidence value associated with eachlabel by the comment classifier.

In particular embodiments, comments in an online social network may beranked and filtered for presentation to a target user based on userimpressions, such as interactions by a user with the comment. Thiscomment-related impression calculation involves looking beyond simplebinary data about how users interaction with comments, e.g., whether auser clicked on a link, clicked “Like,” or replied (or whether the userread the article or not before commenting). Such impression calculationalgorithms may help to make a deeper qualitative assessment of thecomment based on, for example, a user's reaction to viewing the comment.

A score may be determined for each of the comments based on aqualitative analysis of each of one or more impressions related to thecomment, and where each of the impressions includes a past interactionby a historical user with the comment. The comments may be presented tothe target user in a sorted order based on the respective scores. Thequalitative analysis may determine a category of interaction for theimpression, and the score may be based at least in part on the categoryof interaction and a degree of the interaction. The category ofinteraction may be user input related to the comment. The user input maybe a mouseover of the comment, a request for expansion of the comment,scrolling within the comment, and other user-interface input. Thecomment's score may be increased if the user input indicates that theuser is viewing or interacting with a comment, or decreased if the userinput indicates that the user has stopped viewing the comment, e.g., bynavigating away from the comment. The embodiments disclosed above areonly examples, and the scope of this disclosure is not limited to them.Particular embodiments may include all, some, or none of the components,elements, features, functions, operations, or steps of the embodimentsdisclosed above. Embodiments according to the invention are inparticular disclosed in the attached claims directed to a method, astorage medium, a system and a computer program product, where anyfeature mentioned in one claim category, e.g. method, can be claimed inanother claim category, e.g. system, as well. The dependencies orreferences back in the attached claims are chosen for formal reasonsonly. However any subject matter resulting from a deliberate referenceback to any previous claims (in particular multiple dependencies) can beclaimed as well, so that any combination of claims and the featuresthereof are disclosed and can be claimed regardless of the dependencieschosen in the attached claims. The subject-matter which can be claimedcomprises not only the combinations of features as set out in theattached claims but also any other combination of features in theclaims, where each feature mentioned in the claims can be combined withany other feature or combination of other features in the claims.Furthermore, any of the embodiments and features described or depictedherein can be claimed in a separate claim and/or in any combination withany embodiment or feature described or depicted herein or with any ofthe features of the attached claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with asocial-networking system.

FIG. 2 illustrates an example social graph.

FIGS. 3A-3C illustrate an example of comments associated with a post ina social-networking system.

FIG. 4A illustrates an example of signal values for comments associatedwith a post.

FIG. 4B illustrates an example of comment-related action countsassociated with users.

FIGS. 5A and 5B illustrate example orderings of comments by score.

FIG. 6 illustrates an example method for ranking and filtering commentsbased on the author-related and content-related features of thecomments.

FIG. 7 illustrates an example method for ranking and filtering commentsbased on audience-related features of the comments.

FIG. 8 illustrates an example method for ranking and filtering commentsbased on interactions of the user viewing the comments with one or moresocial networking feeds.

FIG. 9 illustrates an example method for ranking and filtering commentsbased on labelling of the comments.

FIG. 10 illustrates an example method for ranking and filtering commentsbased on impression calculations that include interactions by historicalusers with the comments.

FIG. 11 illustrates an example of interaction with a news feed.

FIG. 12 illustrates an example comment classifier.

FIG. 13 illustrates an example of a user interface via which a targetuser may interact with posts and comments.

FIG. 14 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

FIG. 1 illustrates an example network environment 100 associated with asocial-networking system. Network environment 100 includes a clientsystem 130, a social-networking system 160, and a third-party system 170connected to each other by a network 110. Although FIG. 1 illustrates aparticular arrangement of client system 130, social-networking system160, third-party system 170, and network 110, this disclosurecontemplates any suitable arrangement of client system 130,social-networking system 160, third-party system 170, and network 110.As an example and not by way of limitation, two or more of client system130, social-networking system 160, and third-party system 170 may beconnected to each other directly, bypassing network 110. As anotherexample, two or more of client system 130, social-networking system 160,and third-party system 170 may be physically or logically co-locatedwith each other in whole or in part. Moreover, although FIG. 1illustrates a particular number of client systems 130, social-networkingsystems 160, third-party systems 170, and networks 110, this disclosurecontemplates any suitable number of client systems 130,social-networking systems 160, third-party systems 170, and networks110. As an example and not by way of limitation, network environment 100may include multiple client system 130, social-networking systems 160,third-party systems 170, and networks 110.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect client system 130, social-networking system 160,and third-party system 170 to communication network 110 or to eachother. This disclosure contemplates any suitable links 150. Inparticular embodiments, one or more links 150 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOCSIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 150 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 150, or a combination of two or more such links150. Links 150 need not necessarily be the same throughout networkenvironment 100. One or more first links 150 may differ in one or morerespects from one or more second links 150.

In particular embodiments, client system 130 may be an electronic deviceincluding hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functionalities implemented or supported by clientsystem 130. As an example and not by way of limitation, a client system130 may include a computer system such as a desktop computer, notebookor laptop computer, netbook, a tablet computer, e-book reader, GPSdevice, camera, personal digital assistant (PDA), handheld electronicdevice, cellular telephone, smartphone, other suitable electronicdevice, or any suitable combination thereof. This disclosurecontemplates any suitable client systems 130. A client system 130 mayenable a network user at client system 130 to access network 110. Aclient system 130 may enable its user to communicate with other users atother client systems 130.

In particular embodiments, client system 130 may include a web browser132, such as MICROSOFT INTERNET EXPLORER, GOOGLE CHROME or MOZILLAFIREFOX, and may have one or more add-ons, plug-ins, or otherextensions, such as TOOLBAR or YAHOO TOOLBAR. A user at client system130 may enter a Uniform Resource Locator (URL) or other addressdirecting the web browser 132 to a particular server (such as server162, or a server associated with a third-party system 170), and the webbrowser 132 may generate a Hyper Text Transfer Protocol (HTTP) requestand communicate the HTTP request to server. The server may accept theHTTP request and communicate to client system 130 one or more Hyper TextMarkup Language (HTML) files responsive to the HTTP request. Clientsystem 130 may render a webpage based on the HTML files from the serverfor presentation to the user. This disclosure contemplates any suitablewebpage files. As an example and not by way of limitation, webpages mayrender from HTML files, Extensible Hyper Text Markup Language (XHTML)files, or Extensible Markup Language (XML) files, according toparticular needs. Such pages may also execute scripts such as, forexample and without limitation, those written in JAVASCRIPT, JAVA,MICROSOFT SILVERLIGHT, combinations of markup language and scripts suchas AJAX (Asynchronous JAVASCRIPT and XML), and the like. Herein,reference to a webpage encompasses one or more corresponding webpagefiles (which a browser may use to render the webpage) and vice versa,where appropriate.

In particular embodiments, social-networking system 160 may be anetwork-addressable computing system that can host an online socialnetwork. Social-networking system 160 may generate, store, receive, andsend social-networking data, such as, for example, user-profile data,concept-profile data, social-graph information, or other suitable datarelated to the online social network. Social-networking system 160 maybe accessed by the other components of network environment 100 eitherdirectly or via network 110. As an example and not by way of limitation,client system 130 may access social-networking system 160 using a webbrowser 132, or a native application associated with social-networkingsystem 160 (e.g., a mobile social-networking application, a messagingapplication, another suitable application, or any combination thereof)either directly or via network 110. In particular embodiments,social-networking system 160 may include one or more servers 162. Eachserver 162 may be a unitary server or a distributed server spanningmultiple computers or multiple datacenters. Servers 162 may be ofvarious types, such as, for example and without limitation, web server,news server, mail server, message server, advertising server, fileserver, application server, exchange server, database server, proxyserver, another server suitable for performing functions or processesdescribed herein, or any combination thereof. In particular embodiments,each server 162 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server162. In particular embodiments, social-networking system 160 may includeone or more data stores 164. Data stores 164 may be used to storevarious types of information. In particular embodiments, the informationstored in data stores 164 may be organized according to specific datastructures. In particular embodiments, each data store 164 may be arelational, columnar, correlation, or other suitable database. Althoughthis disclosure describes or illustrates particular types of databases,this disclosure contemplates any suitable types of databases. Particularembodiments may provide interfaces that enable a client system 130, asocial-networking system 160, or a third-party system 170 to manage,retrieve, modify, add, or delete, the information stored in data store164.

In particular embodiments, social-networking system 160 may store one ormore social graphs in one or more data stores 164. In particularembodiments, a social graph may include multiple nodes—which may includemultiple user nodes (each corresponding to a particular user) ormultiple concept nodes (each corresponding to a particular concept)—andmultiple edges connecting the nodes. Social-networking system 160 mayprovide users of the online social network the ability to communicateand interact with other users. In particular embodiments, users may jointhe online social network via social-networking system 160 and then addconnections (e.g., relationships) to a number of other users ofsocial-networking system 160 to whom they want to be connected. Herein,the term “friend” may refer to any other user of social-networkingsystem 160 with whom a user has formed a connection, association, orrelationship via social-networking system 160.

In particular embodiments, social-networking system 160 may provideusers with the ability to take actions on various types of items orobjects, supported by social-networking system 160. As an example andnot by way of limitation, the items and objects may include groups orsocial networks to which users of social-networking system 160 maybelong, events or calendar entries in which a user might be interested,computer-based applications that a user may use, transactions that allowusers to buy or sell items via the service, interactions withadvertisements that a user may perform, or other suitable items orobjects. A user may interact with anything that is capable of beingrepresented in social-networking system 160 or by an external system ofthird-party system 170, which is separate from social-networking system160 and coupled to social-networking system 160 via a network 110.

In particular embodiments, social-networking system 160 may be capableof linking a variety of entities. As an example and not by way oflimitation, social-networking system 160 may enable users to interactwith each other as well as receive content from third-party systems 170or other entities, or to allow users to interact with these entitiesthrough an application programming interfaces (API) or othercommunication channels.

In particular embodiments, a third-party system 170 may include one ormore types of servers, one or more data stores, one or more interfaces,including but not limited to APIs, one or more web services, one or morecontent sources, one or more networks, or any other suitable components,e.g., that servers may communicate with. A third-party system 170 may beoperated by a different entity from an entity operatingsocial-networking system 160. In particular embodiments, however,social-networking system 160 and third-party systems 170 may operate inconjunction with each other to provide social-networking services tousers of social-networking system 160 or third-party systems 170. Inthis sense, social-networking system 160 may provide a platform, orbackbone, which other systems, such as third-party systems 170, may useto provide social-networking services and functionality to users acrossthe Internet.

In particular embodiments, a third-party system 170 may include athird-party content object provider. A third-party content objectprovider may include one or more sources of content objects, which maybe communicated to a client system 130. As an example and not by way oflimitation, content objects may include information regarding things oractivities of interest to the user, such as, for example, movie showtimes, movie reviews, restaurant reviews, restaurant menus, productinformation and reviews, or other suitable information. As anotherexample and not by way of limitation, content objects may includeincentive content objects, such as coupons, discount tickets, giftcertificates, or other suitable incentive objects.

In particular embodiments, social-networking system 160 also includesuser-generated content objects, which may enhance a user's interactionswith social-networking system 160. User-generated content may includeanything a user can add, upload, send, or “post” to social-networkingsystem 160. As an example and not by way of limitation, a usercommunicates posts to social-networking system 160 from a client system130. Posts may include data such as status updates or other textualdata, location information, photos, videos, links, music or othersimilar data or media. Content may also be added to social-networkingsystem 160 by a third-party through a “communication channel,” such as anewsfeed or stream.

In particular embodiments, social-networking system 160 may include avariety of servers, sub-systems, programs, modules, logs, and datastores. In particular embodiments, social-networking system 160 mayinclude one or more of the following: a web server, action logger,API-request server, relevance-and-ranking engine, content-objectclassifier, notification controller, action log,third-party-content-object-exposure log, inference module,authorization/privacy server, search module, advertisement-targetingmodule, user-interface module, user-profile store, connection store,third-party content store, or location store. Social-networking system160 may also include suitable components such as network interfaces,security mechanisms, load balancers, failover servers,management-and-network-operations consoles, other suitable components,or any suitable combination thereof. In particular embodiments,social-networking system 160 may include one or more user-profile storesfor storing user profiles. A user profile may include, for example,biographic information, demographic information, behavioral information,social information, or other types of descriptive information, such aswork experience, educational history, hobbies or preferences, interests,affinities, or location. Interest information may include interestsrelated to one or more categories. Categories may be general orspecific. As an example and not by way of limitation, if a user “likes”an article about a brand of shoes the category may be the brand, or thegeneral category of “shoes” or “clothing.” A connection store may beused for storing connection information about users. The connectioninformation may indicate users who have similar or common workexperience, group memberships, hobbies, educational history, or are inany way related or share common attributes. The connection informationmay also include user-defined connections between different users andcontent (both internal and external). A web server may be used forlinking social-networking system 160 to one or more client systems 130or one or more third-party system 170 via network 110. The web servermay include a mail server or other messaging functionality for receivingand routing messages between social-networking system 160 and one ormore client systems 130. An API-request server may allow a third-partysystem 170 to access information from social-networking system 160 bycalling one or more APIs. An action logger may be used to receivecommunications from a web server about a user's actions on or offsocial-networking system 160. In conjunction with the action log, athird-party-content-object log may be maintained of user exposures tothird-party-content objects. A notification controller may provideinformation regarding content objects to a client system 130.Information may be pushed to a client system 130 as notifications, orinformation may be pulled from client system 130 responsive to a requestreceived from client system 130. Authorization servers may be used toenforce one or more privacy settings of the users of social-networkingsystem 160. A privacy setting of a user determines how particularinformation associated with a user can be shared. The authorizationserver may allow users to opt in to or opt out of having their actionslogged by social-networking system 160 or shared with other systems(e.g., third-party system 170), such as, for example, by settingappropriate privacy settings. Third-party-content-object stores may beused to store content objects received from third parties, such as athird-party system 170. Location stores may be used for storing locationinformation received from client systems 130 associated with users.Advertisement-pricing modules may combine social information, thecurrent time, location information, or other suitable information toprovide relevant advertisements, in the form of notifications, to auser.

FIG. 2 illustrates example social graph 200. In particular embodiments,social-networking system 160 may store one or more social graphs 200 inone or more data stores. In particular embodiments, social graph 200 mayinclude multiple nodes—which may include multiple user nodes 202 ormultiple concept nodes 204—and multiple edges 206 connecting the nodes.Example social graph 200 illustrated in FIG. 2 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 160, client system 130, orthird-party system 170 may access social graph 200 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 200 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 200.

In particular embodiments, a user node 202 may correspond to a user ofsocial-networking system 160. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 160. In particular embodiments, when a userregisters for an account with social-networking system 160,social-networking system 160 may create a user node 202 corresponding tothe user, and store the user node 202 in one or more data stores. Usersand user nodes 202 described herein may, where appropriate, refer toregistered users and user nodes 202 associated with registered users. Inaddition or as an alternative, users and user nodes 202 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 160. In particular embodiments, a user node 202may be associated with information provided by a user or informationgathered by various systems, including social-networking system 160. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 202 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 202 may correspond to one or more webpages.

In particular embodiments, a concept node 204 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 160 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 160 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory;another suitable concept; or two or more such concepts. A concept node204 may be associated with information of a concept provided by a useror information gathered by various systems, including social-networkingsystem 160. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 204 may beassociated with one or more data objects corresponding to informationassociated with concept node 204. In particular embodiments, a conceptnode 204 may correspond to one or more webpages.

In particular embodiments, a node in social graph 200 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 160. Profile pages may also be hosted onthird-party websites associated with a third-party server 170. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 204.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 202 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express himself orherself. As another example and not by way of limitation, a concept node204 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node204.

In particular embodiments, a concept node 204 may represent athird-party webpage or resource hosted by a third-party system 170. Thethird-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check-in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “check-in”), causing a clientsystem 130 to send to social-networking system 160 a message indicatingthe user's action. In response to the message, social-networking system160 may create an edge (e.g., a check-in-type edge) between a user node202 corresponding to the user and a concept node 204 corresponding tothe third-party webpage or resource and store edge 206 in one or moredata stores.

In particular embodiments, a pair of nodes in social graph 200 may beconnected to each other by one or more edges 206. An edge 206 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 206 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 160 maysend a “friend request” to the second user. If the second user confirmsthe “friend request,” social-networking system 160 may create an edge206 connecting the first user's user node 202 to the second user's usernode 202 in social graph 200 and store edge 206 as social-graphinformation in one or more of data stores 164. In the example of FIG. 2,social graph 200 includes an edge 206 indicating a friend relationbetween user nodes 202 of user “A” and user “B” and an edge indicating afriend relation between user nodes 202 of user “C” and user “B.”Although this disclosure describes or illustrates particular edges 206with particular attributes connecting particular user nodes 202, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202. As an example and not by way oflimitation, an edge 206 may represent a friendship, family relationship,business or employment relationship, fan relationship (including, e.g.,liking, etc.), follower relationship, visitor relationship (including,e.g., accessing, viewing, checking-in, sharing, etc.), subscriberrelationship, superior/subordinate relationship, reciprocalrelationship, non-reciprocal relationship, another suitable type ofrelationship, or two or more such relationships. Moreover, although thisdisclosure generally describes nodes as being connected, this disclosurealso describes users or concepts as being connected. Herein, referencesto users or concepts being connected may, where appropriate, refer tothe nodes corresponding to those users or concepts being connected insocial graph 200 by one or more edges 206.

In particular embodiments, an edge 206 between a user node 202 and aconcept node 204 may represent a particular action or activity performedby a user associated with user node 202 toward a concept associated witha concept node 204. As an example and not by way of limitation, asillustrated in FIG. 2, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to a edge type or subtype. A concept-profile pagecorresponding to a concept node 204 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 160 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Imagine”) using aparticular application (SPOTIFY, which is an online music application).In this case, social-networking system 160 may create a “listened” edge206 and a “used” edge (as illustrated in FIG. 2) between user nodes 202corresponding to the user and concept nodes 204 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 160 may createa “played” edge 206 (as illustrated in FIG. 2) between concept nodes 204corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 206 corresponds to an action performed by an externalapplication (SPOTIFY) on an external audio file (the song “Imagine”).Although this disclosure describes particular edges 206 with particularattributes connecting user nodes 202 and concept nodes 204, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202 and concept nodes 204. Moreover,although this disclosure describes edges between a user node 202 and aconcept node 204 representing a single relationship, this disclosurecontemplates edges between a user node 202 and a concept node 204representing one or more relationships. As an example and not by way oflimitation, an edge 206 may represent both that a user likes and hasused at a particular concept. Alternatively, another edge 206 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 202 and a concept node 204 (asillustrated in FIG. 2 between user node 202 for user “E” and conceptnode 204 for “SPOTIFY”).

In particular embodiments, social-networking system 160 may create anedge 206 between a user node 202 and a concept node 204 in social graph200. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's client system 130) mayindicate that he or she likes the concept represented by the conceptnode 204 by clicking or selecting a “Like” icon, which may cause theuser's client system 130 to send to social-networking system 160 amessage indicating the user's liking of the concept associated with theconcept-profile page. In response to the message, social-networkingsystem 160 may create an edge 206 between user node 202 associated withthe user and concept node 204, as illustrated by “like” edge 206 betweenthe user and concept node 204. In particular embodiments,social-networking system 160 may store an edge 206 in one or more datastores. In particular embodiments, an edge 206 may be automaticallyformed by social-networking system 160 in response to a particular useraction. As an example and not by way of limitation, if a first useruploads a picture, watches a movie, or listens to a song, an edge 206may be formed between user node 202 corresponding to the first user andconcept nodes 204 corresponding to those concepts. Although thisdisclosure describes forming particular edges 206 in particular manners,this disclosure contemplates forming any suitable edges 206 in anysuitable manner.

In particular embodiments, an advertisement may be text (which may beHTML-linked), one or more images (which may be HTML-linked), one or morevideos, audio, one or more ADOBE FLASH files, a suitable combination ofthese, or any other suitable advertisement in any suitable digitalformat presented on one or more web pages, in one or more e-mails, or inconnection with search results requested by a user. In addition or as analternative, an advertisement may be one or more sponsored stories(e.g., a news-feed or ticker item on social-networking system 160). Asponsored story may be a social action by a user (such as “liking” apage, “liking” or commenting on a post on a page, RSVPing to an eventassociated with a page, voting on a question posted on a page, checkingin to a place, using an application or playing a game, or “liking” orsharing a website) that an advertiser promotes, for example, by havingthe social action presented within a pre-determined area of a profilepage of a user or other page, presented with additional informationassociated with the advertiser, bumped up or otherwise highlightedwithin news feeds or tickers of other users, or otherwise promoted. Theadvertiser may pay to have the social action promoted. The social actionmay be promoted within or on social-networking system 160. In additionor as an alternative, the social action may be promoted outside or offof social-networking system 160, where appropriate. In particularembodiments, a page may be an on-line presence (such as a webpage orwebsite within or outside of social-networking system 160) of abusiness, organization, or brand facilitating its sharing of stories andconnecting with people. A page may be customized, for example, by addingapplications, posting stories, or hosting events.

A sponsored story may be generated from stories in users' news feeds andpromoted to specific areas within displays of users' web browsers whenviewing a web page associated with social-networking system 160.Sponsored stories are more likely to be viewed by users, at least inpart because sponsored stories generally involve interactions orsuggestions by the users' friends, fan pages, or other connections. Inconnection with sponsored stories, particular embodiments may utilizeone or more systems, components, elements, functions, methods,operations, or steps disclosed in U.S. patent application Ser. No.13/327,557, entitled “Sponsored Stories Unit Creation from OrganicActivity Stream” and filed 15 Dec. 2011, U.S. Patent ApplicationPublication No. 2012/0203831, entitled “Sponsored Stories Unit Creationfrom Organic Activity Stream” and filed 3 Feb. 2012 as U.S. patentapplication Ser. No. 13/020,745, or U.S. Patent Application PublicationNo. 2012/0233009, entitled “Endorsement Subscriptions for SponsoredStories” and filed 9 Mar. 2011 as U.S. patent application Ser. No.13/044,506, which are all incorporated herein by reference as an exampleand not by way of limitation. In particular embodiments, sponsoredstories may utilize computer-vision algorithms to detect products inuploaded images or photos lacking an explicit connection to anadvertiser as disclosed in U.S. patent application Ser. No. 13/212,356,entitled “Computer-Vision Content Detection for Sponsored Stories” andfiled 18 Aug. 2011, which is incorporated herein by reference as anexample and not by way of limitation.

As described above, an advertisement may be text (which may beHTML-linked), one or more images (which may be HTML-linked), one or morevideos, audio, one or more ADOBE FLASH files, a suitable combination ofthese, or any other suitable advertisement in any suitable digitalformat. In particular embodiments, an advertisement may be requested fordisplay within third-party webpages, social-networking-system webpages,or other pages. An advertisement may be displayed in a dedicated portionof a page, such as in a banner area at the top of the page, in a columnat the side of the page, in a GUI of the page, in a pop-up window, overthe top of content of the page, or elsewhere with respect to the page.In addition or as an alternative, an advertisement may be displayedwithin an application or within a game. An advertisement may bedisplayed within dedicated pages, requiring the user to interact with orwatch the advertisement before the user may access a page, utilize anapplication, or play a game. The user may, for example view theadvertisement through a web browser.

A user may interact with an advertisement in any suitable manner. Theuser may click or otherwise select the advertisement, and theadvertisement may direct the user (or a browser or other applicationbeing used by the user) to a page associated with the advertisement. Atthe page associated with the advertisement, the user may take additionalactions, such as purchasing a product or service associated with theadvertisement, receiving information associated with the advertisement,or subscribing to a newsletter associated with the advertisement. Anadvertisement with audio or video may be played by selecting a componentof the advertisement (like a “play button”). In particular embodiments,an advertisement may include one or more games, which a user or otherapplication may play in connection with the advertisement. Anadvertisement may include functionality for responding to a poll orquestion in the advertisement.

An advertisement may include social-networking-system functionality thata user may interact with. For example, an advertisement may enable auser to “like” or otherwise endorse the advertisement by selecting anicon or link associated with endorsement. Similarly, a user may sharethe advertisement with another user (e.g., through social-networkingsystem 160) or RSVP (e.g., through social-networking system 160) to anevent associated with the advertisement. In addition or as analternative, an advertisement may include social-networking-systemcontent directed to the user. For example, an advertisement may displayinformation about a friend of the user within social-networking system160 who has taken an action associated with the subject matter of theadvertisement.

Social-networking-system functionality or content may be associated withan advertisement in any suitable manner. For example, an advertisingsystem (which may include hardware, software, or both for receiving bidsfor advertisements and selecting advertisements in response) mayretrieve social-networking functionality or content fromsocial-networking system 160 and incorporate the retrievedsocial-networking functionality or content into the advertisement beforeserving the advertisement to a user. Examples of selecting and providingsocial-networking-system functionality or content with an advertisementare disclosed in U.S. Patent Application Publication No. 2012/0084160,entitled “Providing Social Endorsements with Online Advertising” andfiled 5 Oct. 2010 as U.S. patent application Ser. No. 12/898,662, and inU.S. Patent Application Publication No. 2012/0232998, entitled“Selecting Social Endorsement Information for an Advertisement forDisplay to a Viewing User” and filed 8 Mar. 2011 as U.S. patentapplication Ser. No. 13/043,424, which are both incorporated herein byreference as examples only and not by way of limitation. Interactingwith an advertisement that is associated with social-networking-systemfunctionality or content may cause information about the interaction tobe displayed in a profile page of the user in social-networking-system160.

Particular embodiments may facilitate the delivery of advertisements tousers that are more likely to find the advertisements more relevant oruseful. For example, an advertiser may realize higher conversion rates(and therefore higher return on investment (ROI) from advertising) byidentifying and targeting users that are more likely to find itsadvertisements more relevant or useful. The advertiser may useuser-profile information in social-networking system 160 to identifythose users. In addition or as an alternative, social-networking system160 may use user-profile information in social-networking system 160 toidentify those users for the advertiser. As examples and not by way oflimitation, particular embodiments may target users with the following:invitations or suggestions of events; suggestions regarding coupons,deals, or wish-list items; suggestions regarding friends' life events;suggestions regarding groups; advertisements; or social advertisements.Such targeting may occur, where appropriate, on or withinsocial-networking system 160, off or outside of social-networking system160, or on mobile computing devices of users. When on or withinsocial-networking system 160, such targeting may be directed to users'news feeds, search results, e-mail or other in-boxes, or notificationschannels or may appear in particular area of web pages ofsocial-networking system 160, such as a right-hand side of a web page ina concierge or grouper area (which may group along a right-hand railadvertisements associated with the same concept, node, or object) or anetwork-ego area (which may be based on what a user is viewing on theweb page and a current news feed of the user). When off or outside ofsocial-networking system 160, such targeting may be provided through athird-party website, e.g., involving an ad exchange or a social plug-in.When on a mobile computing device of a user, such targeting may beprovided through push notifications to the mobile computing device.

Targeting criteria used to identify and target users may includeexplicit, stated user interests on social-networking system 160 orexplicit connections of a user to a node, object, entity, brand, or pageon social-networking system 160. In addition or as an alternative, suchtargeting criteria may include implicit or inferred user interests orconnections (which may include analyzing a user's history, demographic,social or other activities, friends' social or other activities,subscriptions, or any of the preceding of other users similar to theuser (based, e.g., on shared interests, connections, or events)).Particular embodiments may utilize platform targeting, which may involveplatform and “like” impression data; contextual signals (e.g., “Who isviewing now or has viewed recently the page for COCA-COLA?”);light-weight connections (e.g., “check-ins”); connection lookalikes;fans; extracted keywords; EMU advertising; inferential advertising;coefficients, affinities, or other social-graph information;friends-of-friends connections; pinning or boosting; deals; polls;household income, social clusters or groups; products detected in imagesor other media; social- or open-graph edge types; geo-prediction; viewsof profile or pages; status updates or other user posts (analysis ofwhich may involve natural-language processing or keyword extraction);events information; or collaborative filtering. Identifying andtargeting users may also include privacy settings (such as useropt-outs), data hashing, or data anonymization, as appropriate.

To target users with advertisements, particular embodiments may utilizeone or more systems, components, elements, functions, methods,operations, or steps disclosed in the following, which are allincorporated herein by reference as examples and not by way oflimitation: U.S. Patent Application Publication No. 2009/0119167,entitled “Social Advertisements and Other Informational Messages on aSocial Networking Website and Advertising Model for Same” and filed 18Aug. 2008 as U.S. patent application Ser. No. 12/193,702; U.S. PatentApplication Publication No. 2009/0070219, entitled “TargetingAdvertisements in a Social Network” and filed 20 Aug. 2008 as U.S.patent application Ser. No. 12/195,321; U. S. Patent ApplicationPublication No. 2012/0158501, entitled “Targeting Social Advertising toFriends of Users Who Have Interacted With an Object Associated with theAdvertising” and filed 15 Dec. 2010 as U.S. patent application Ser. No.12/968,786; or U.S. Patent Application Publication No. 2012/0166532,entitled “Contextually Relevant Affinity Prediction in aSocial-Networking System” and filed 23 Dec. 2010 as U.S. patentapplication Ser. No. 12/978,265.

An advertisement may be presented or otherwise delivered using plug-insfor web browsers or other applications, iframe elements, news feeds,tickers, notifications (which may include, for example, e-mail, ShortMessage Service (SMS) messages, or notifications), or other means. Anadvertisement may be presented or otherwise delivered to a user on amobile or other computing device of the user. In connection withdelivering advertisements, particular embodiments may utilize one ormore systems, components, elements, functions, methods, operations, orsteps disclosed in the following, which are all incorporated herein byreference as examples and not by way of limitation: U.S. PatentApplication Publication No. 2012/0159635, entitled “Comment Plug-In forThird-Party System” and filed 15 Dec. 2010 as U.S. patent applicationSer. No. 12/969,368; U. S. Patent Application Publication No.2012/0158753, entitled “Comment Ordering System” and filed 15 Dec. 2010as U.S. patent application Ser. No. 12/969,408; U.S. Pat. No. 7,669,123,entitled “Dynamically Providing a News Feed About a User of a SocialNetwork” and filed 11 Aug. 2006 as U.S. patent application Ser. No.11/503,242; U.S. Pat. No. 8,402,094, entitled “Providing a NewsfeedBased on User Affinity for Entities and Monitored Actions in a SocialNetwork Environment” and filed 11 Aug. 2006 as U.S. patent applicationSer. No. 11/503,093; U.S. Patent Application Publication No.2012/0072428, entitled “Action Clustering for News Feeds” and filed 16Sep. 2010 as U.S. patent application Ser. No. 12/884,010; U.S. PatentApplication Publication No. 2011/0004692, entitled “GatheringInformation about Connections in a Social Networking Service” and filed1 Jul. 2009 as U.S. patent application Ser. No. 12/496,606; U.S. PatentApplication Publication No. 2008/0065701, entitled “Method and Systemfor Tracking Changes to User Content in an Online Social Network” andfiled 12 Sep. 2006 as U.S. patent application Ser. No. 11/531,154; U.S.Patent Application Publication No. 2008/0065604, entitled “FeedingUpdates to Landing Pages of Users of an Online Social Network fromExternal Sources” and filed 17 Jan. 2007 as U.S. patent application Ser.No. 11/624,088; U.S. Pat. No. 8,244,848, entitled “IntegratedSocial-Network Environment” and filed 19 Apr. 2010 as U.S. patentapplication Ser. No. 12/763,171; U.S. Patent Application Publication No.2011/0083101, entitled “Sharing of Location-Based Content Item inSocial-Networking Service” and filed 6 Oct. 2009 as U.S. patentapplication Ser. No. 12/574,614; U.S. Pat. No. 8,150,844, entitled“Location Ranking Using Social-Graph Information” and filed 18 Aug. 2010as U.S. patent application Ser. No. 12/858,718; U.S. patent applicationSer. No. 13/051,286, entitled “Sending Notifications to Users Based onUsers' Notification Tolerance Levels” and filed 18 Mar. 2011; U.S.patent application Ser. No. 13/096,184, entitled “Managing NotificationsPushed to User Devices” and filed 28 Apr. 2011; U.S. patent applicationSer. No. 13/276,248, entitled “Platform-Specific Notification DeliveryChannel” and filed 18 Oct. 2011; or U.S. Patent Application PublicationNo. 2012/0197709, entitled “Mobile Advertisement with Social Componentfor Geo-Social Networking System” and filed 1 Feb. 2011 as U.S. patentapplication Ser. No. 13/019,061. Although this disclosure describes orillustrates particular advertisements being delivered in particular waysand in connection with particular content, this disclosure contemplatesany suitable advertisements delivered in any suitable ways and inconnection with any suitable content.

In particular embodiments, social-networking system 160 may determinethe social-graph affinity (which may be referred to herein as“affinity”) of various social-graph entities for each other. Affinitymay represent the strength of a relationship or level of interestbetween particular objects associated with the online social network,such as users, concepts, content, actions, advertisements, other objectsassociated with the online social network, or any suitable combinationthereof. Affinity may also be determined with respect to objectsassociated with third-party systems 170 or other suitable systems. Anoverall affinity for a social-graph entity for each user, subjectmatter, or type of content may be established. The overall affinity maychange based on continued monitoring of the actions or relationshipsassociated with the social-graph entity. Although this disclosuredescribes determining particular affinities in a particular manner, thisdisclosure contemplates determining any suitable affinities in anysuitable manner.

In particular embodiments, social-networking system 160 may measure orquantify social-graph affinity using an affinity coefficient (which maybe referred to herein as “coefficient”). The coefficient may representor quantify the strength of a relationship between particular objectsassociated with the online social network. The coefficient may alsorepresent a probability or function that measures a predictedprobability that a user will perform a particular action based on theuser's interest in the action. In this way, a user's future actions maybe predicted based on the user's prior actions, where the coefficientmay be calculated at least in part a the history of the user's actions.Coefficients may be used to predict any number of actions, which may bewithin or outside of the online social network. As an example and not byway of limitation, these actions may include various types ofcommunications, such as sending messages, posting content, or commentingon content; various types of a observation actions, such as accessing orviewing profile pages, media, or other suitable content; various typesof coincidence information about two or more social-graph entities, suchas being in the same group, tagged in the same photograph, checked-in atthe same location, or attending the same event; or other suitableactions. Although this disclosure describes measuring affinity in aparticular manner, this disclosure contemplates measuring affinity inany suitable manner.

In particular embodiments, social-networking system 160 may use avariety of factors to calculate a coefficient. These factors mayinclude, for example, user actions, types of relationships betweenobjects, location information, other suitable factors, or anycombination thereof. In particular embodiments, different factors may beweighted differently when calculating the coefficient. The weights foreach factor may be static or the weights may change according to, forexample, the user, the type of relationship, the type of action, theuser's location, and so forth. Ratings for the factors may be combinedaccording to their weights to determine an overall coefficient for theuser. As an example and not by way of limitation, particular useractions may be assigned both a rating and a weight while a relationshipassociated with the particular user action is assigned a rating and acorrelating weight (e.g., so the weights total 100%). To calculate thecoefficient of a user towards a particular object, the rating assignedto the user's actions may comprise, for example, 60% of the overallcoefficient, while the relationship between the user and the object maycomprise 40% of the overall coefficient. In particular embodiments, thesocial-networking system 160 may consider a variety of variables whendetermining weights for various factors used to calculate a coefficient,such as, for example, the time since information was accessed, decayfactors, frequency of access, relationship to information orrelationship to the object about which information was accessed,relationship to social-graph entities connected to the object, short- orlong-term averages of user actions, user feedback, other suitablevariables, or any combination thereof. As an example and not by way oflimitation, a coefficient may include a decay factor that causes thestrength of the signal provided by particular actions to decay withtime, such that more recent actions are more relevant when calculatingthe coefficient. The ratings and weights may be continuously updatedbased on continued tracking of the actions upon which the coefficient isbased. Any type of process or algorithm may be employed for assigning,combining, averaging, and so forth the ratings for each factor and theweights assigned to the factors. In particular embodiments,social-networking system 160 may determine coefficients usingmachine-learning algorithms trained on historical actions and past userresponses, or data farmed from users by exposing them to various optionsand measuring responses. Although this disclosure describes calculatingcoefficients in a particular manner, this disclosure contemplatescalculating coefficients in any suitable manner.

In particular embodiments, social-networking system 160 may calculate acoefficient based on a user's actions. Social-networking system 160 maymonitor such actions on the online social network, on a third-partysystem 170, on other suitable systems, or any combination thereof. Anysuitable type of user actions may be tracked or monitored. Typical useractions include viewing profile pages, creating or posting content,interacting with content, tagging or being tagged in images, joininggroups, listing and confirming attendance at events, checking-in atlocations, liking particular pages, creating pages, and performing othertasks that facilitate social action. In particular embodiments,social-networking system 160 may calculate a coefficient based on theuser's actions with particular types of content. The content may beassociated with the online social network, a third-party system 170, oranother suitable system. The content may include users, profile pages,posts, news stories, headlines, instant messages, chat roomconversations, emails, advertisements, pictures, video, music, othersuitable objects, or any combination thereof. Social-networking system160 may analyze a user's actions to determine whether one or more of theactions indicate an affinity for subject matter, content, other users,and so forth. As an example and not by way of limitation, if a user maymake frequently posts content related to “coffee” or variants thereof,social-networking system 160 may determine the user has a highcoefficient with respect to the concept “coffee”. Particular actions ortypes of actions may be assigned a higher weight and/or rating thanother actions, which may affect the overall calculated coefficient. Asan example and not by way of limitation, if a first user emails a seconduser, the weight or the rating for the action may be higher than if thefirst user simply views the user-profile page for the second user.

In particular embodiments, social-networking system 160 may calculate acoefficient based on the type of relationship between particularobjects. Referencing the social graph 200, social-networking system 160may analyze the number and/or type of edges 206 connecting particularuser nodes 202 and concept nodes 204 when calculating a coefficient. Asan example and not by way of limitation, user nodes 202 that areconnected by a spouse-type edge (representing that the two users aremarried) may be assigned a higher coefficient than a user nodes 202 thatare connected by a friend-type edge. In other words, depending upon theweights assigned to the actions and relationships for the particularuser, the overall affinity may be determined to be higher for contentabout the user's spouse than for content about the user's friend. Inparticular embodiments, the relationships a user has with another objectmay affect the weights and/or the ratings of the user's actions withrespect to calculating the coefficient for that object. As an exampleand not by way of limitation, if a user is tagged in first photo, butmerely likes a second photo, social-networking system 160 may determinethat the user has a higher coefficient with respect to the first photothan the second photo because having a tagged-in-type relationship withcontent may be assigned a higher weight and/or rating than having alike-type relationship with content. In particular embodiments,social-networking system 160 may calculate a coefficient for a firstuser based on the relationship one or more second users have with aparticular object. In other words, the connections and coefficientsother users have with an object may affect the first user's coefficientfor the object. As an example and not by way of limitation, if a firstuser is connected to or has a high coefficient for one or more secondusers, and those second users are connected to or have a highcoefficient for a particular object, social-networking system 160 maydetermine that the first user should also have a relatively highcoefficient for the particular object. In particular embodiments, thecoefficient may be based on the degree of separation between particularobjects. The lower coefficient may represent the decreasing likelihoodthat the first user will share an interest in content objects of theuser that is indirectly connected to the first user in the social graph200. As an example and not by way of limitation, social-graph entitiesthat are closer in the social graph 200 (i.e., fewer degrees ofseparation) may have a higher coefficient than entities that are furtherapart in the social graph 200.

In particular embodiments, social-networking system 160 may calculate acoefficient based on location information. Objects that aregeographically closer to each other may be considered to be more relatedor of more interest to each other than more distant objects. Inparticular embodiments, the coefficient of a user towards a particularobject may be based on the proximity of the object's location to acurrent location associated with the user (or the location of a clientsystem 130 of the user). A first user may be more interested in otherusers or concepts that are closer to the first user. As an example andnot by way of limitation, if a user is one mile from an airport and twomiles from a gas station, social-networking system 160 may determinethat the user has a higher coefficient for the airport than the gasstation based on the proximity of the airport to the user.

In particular embodiments, social-networking system 160 may performparticular actions with respect to a user based on coefficientinformation. Coefficients may be used to predict whether a user willperform a particular action based on the user's interest in the action.A coefficient may be used when generating or presenting any type ofobjects to a user, such as advertisements, search results, news stories,media, messages, notifications, or other suitable objects. Thecoefficient may also be utilized to rank and order such objects, asappropriate. In this way, social-networking system 160 may provideinformation that is relevant to user's interests and currentcircumstances, increasing the likelihood that they will find suchinformation of interest. In particular embodiments, social-networkingsystem 160 may generate content based on coefficient information.Content objects may be provided or selected based on coefficientsspecific to a user. As an example and not by way of limitation, thecoefficient may be used to generate media for the user, where the usermay be presented with media for which the user has a high overallcoefficient with respect to the media object. As another example and notby way of limitation, the coefficient may be used to generateadvertisements for the user, where the user may be presented withadvertisements for which the user has a high overall coefficient withrespect to the advertised object. In particular embodiments,social-networking system 160 may generate search results based oncoefficient information. Search results for a particular user may bescored or ranked based on the coefficient associated with the searchresults with respect to the querying user. As an example and not by wayof limitation, search results corresponding to objects with highercoefficients may be ranked higher on a search-results page than resultscorresponding to objects having lower coefficients.

In particular embodiments, social-networking system 160 may calculate acoefficient in response to a request for a coefficient from a particularsystem or process. To predict the likely actions a user may take (or maybe the subject of) in a given situation, any process may request acalculated coefficient for a user. The request may also include a set ofweights to use for various factors used to calculate the coefficient.This request may come from a process running on the online socialnetwork, from a third-party system 170 (e.g., via an API or othercommunication channel), or from another suitable system. In response tothe request, social-networking system 160 may calculate the coefficient(or access the coefficient information if it has previously beencalculated and stored). In particular embodiments, social-networkingsystem 160 may measure an affinity with respect to a particular process.Different processes (both internal and external to the online socialnetwork) may request a coefficient for a particular object or set ofobjects. Social-networking system 160 may provide a measure of affinitythat is relevant to the particular process that requested the measure ofaffinity. In this way, each process receives a measure of affinity thatis tailored for the different context in which the process will use themeasure of affinity.

In connection with social-graph affinity and affinity coefficients,particular embodiments may utilize one or more systems, components,elements, functions, methods, operations, or steps disclosed in U.S.patent application Ser. No. 11/503,093, filed 11 Aug. 2006, U.S. patentapplication Ser. No. 12/977,027, filed 22 Dec. 2010, U.S. patentapplication Ser. No. 12/978,265, filed 23 Dec. 2010, and U.S. patentapplication Ser. No. 13/632,869, filed 1 Oct. 2012, each of which isincorporated by reference.

In particular embodiments, one or more of the content objects of theonline social network may be associated with a privacy setting. Theprivacy settings (or “access settings”) for an object may be stored inany suitable manner, such as, for example, in association with theobject, in an index on an authorization server, in another suitablemanner, or any combination thereof. A privacy setting of an object mayspecify how the object (or particular information associated with anobject) can be accessed (e.g., viewed or shared) using the online socialnetwork. Where the privacy settings for an object allow a particularuser to access that object, the object may be described as being“visible” with respect to that user. As an example and not by way oflimitation, a user of the online social network may specify privacysettings for a user-profile page identify a set of users that may accessthe work experience information on the user-profile page, thus excludingother users from accessing the information. In particular embodiments,the privacy settings may specify a “blocked list” of users that shouldnot be allowed to access certain information associated with the object.In other words, the blocked list may specify one or more users orentities for which an object is not visible. As an example and not byway of limitation, a user may specify a set of users that may not accessphotos albums associated with the user, thus excluding those users fromaccessing the photo albums (while also possibly allowing certain usersnot within the set of users to access the photo albums). In particularembodiments, privacy settings may be associated with particularsocial-graph elements. Privacy settings of a social-graph element, suchas a node or an edge, may specify how the social-graph element,information associated with the social-graph element, or content objectsassociated with the social-graph element can be accessed using theonline social network. As an example and not by way of limitation, aparticular concept node 204 corresponding to a particular photo may havea privacy setting specifying that the photo may only be accessed byusers tagged in the photo and their friends. In particular embodiments,privacy settings may allow users to opt in or opt out of having theiractions logged by social-networking system 160 or shared with othersystems (e.g., third-party system 170). In particular embodiments, theprivacy settings associated with an object may specify any suitablegranularity of permitted access or denial of access. As an example andnot by way of limitation, access or denial of access may be specifiedfor particular users (e.g., only me, my roommates, and my boss), userswithin a particular degrees-of-separation (e.g., friends, orfriends-of-friends), user groups (e.g., the gaming club, my family),user networks (e.g., employees of particular employers, students oralumni of particular university), all users (“public”), no users(“private”), users of third-party systems 170, particular applications(e.g., third-party applications, external websites), other suitableusers or entities, or any combination thereof. Although this disclosuredescribes using particular privacy settings in a particular manner, thisdisclosure contemplates using any suitable privacy settings in anysuitable manner.

In particular embodiments, one or more servers 162 may beauthorization/privacy servers for enforcing privacy settings. Inresponse to a request from a user (or other entity) for a particularobject stored in a data store 164, social-networking system 160 may senda request to the data store 164 for the object. The request may identifythe user associated with the request and may only be sent to the user(or a client system 130 of the user) if the authorization serverdetermines that the user is authorized to access the object based on theprivacy settings associated with the object. If the requesting user isnot authorized to access the object, the authorization server mayprevent the requested object from being retrieved from the data store164, or may prevent the requested object from be sent to the user. Inthe search query context, an object may only be generated as a searchresult if the querying user is authorized to access the object. In otherwords, the object must have a visibility that is visible to the queryinguser. If the object has a visibility that is not visible to the user,the object may be excluded from the search results. Although thisdisclosure describes enforcing privacy settings in a particular manner,this disclosure contemplates enforcing privacy settings in any suitablemanner.

FIGS. 3A-3C illustrate an example of comments associated with a post ina social-networking system. Referencing FIG. 3A, a user interface 302may be presented by a web browser 132 or native application on a displayof a client system 130. A user of the client system 130 may view thepost 304 and the comments 320. Such a user viewing the post 304 and/orcomments 320 is referred to herein as a “target user.” The userinterface 302 may provide access to the social-networking system 160,and may display a social-network post 304 and associated comments 320. Auser may read the posts and comments, and reply to the post and commentsby selecting a Reply option on an action menu 326. The post 304 includesa post author name 306 (“Nick”), a post date 308 indicating that thepost was posted on July 5 at 7:06 pm, text content 310 (“Man beatstrain! Or does he?”), image content 312 showing a man running near atrain, and additional text content 314. The additional text content 314includes a title 316 (“Man Races Tube and Wins”) and detailed textcontent 318 (“In the latest installment of Man Versus Tube . . . ”). Acomment 320 posted in response to the post 304 by a user named Emma isdisplayed below the post 304. The comment 320 is a comment on the post304, as opposed to a comment on another comment. The comment 320 istherefore referred to herein as a “direct” response to the post 304. Thecomment 320 includes a comment author name 322 (“Emma”), text content324 (“I read this article on uknews.com”), and the action menu 326,which includes Like, Reply, Remove, and Preview actions that can beselected by the target user viewing the user interface 302 to performthe respective social network actions, e.g., liking, replying, removing,or previewing the post. The action menu 326 also includes an indicationthat the comment was posted 9 minutes ago. The target user may requestthat more comments be displayed by selecting (e.g., clicking on ortouching) a button 328 labeled “Show more comments.” When the userselects the button 328, additional comments may be displayed below thecomment 320. These additional comments may be displayed in the userinterface 302 adjacent to the comment 320 (which may be displayedadjacent to the post 304), but are shown in FIGS. 3B and 3C for clarity.

Referencing FIG. 3B, the user interface 302 displays comments 330-346when, for example, the target user (e.g., the user viewing the comments)selects the button 328 to show more comments. Comments 330-336 and342-346 are direct responses to the post 304. Comments 338 and 340 areresponses to the comment 336, and comment 346 is a response to thecomment 344, as described below. Comment 330 by an author Nick has textcontent “Check out LowMortgageRates.com.” Comment 332 by an author Jakehas text content “My cousin made $900 in three days.” Comment 334 byJake has text content “Hi Sarah Emma Nick.” Comment 336 by Sarah hastext content “Is this really what head mounted cameras are for?” Comment338 by Nick is a response to comment 336 and has text content “No—andhead-mounted cameras shouldn't be used on trains!” Comment 340 by Nickis a response to comment 336 and has text content “How do we know heactually did it? Comment 342 by Nick has text content “Blah blah blah.”Comment 344 by Emma has text content “This is the third story I've seentoday about racing.” Comment 346 by Nick is a response to comment 344and has text content “I've seen four stories about train races in thepast hour!” The target user may request that more comments be displayedby selecting a button 348 labeled “Show more comments.” Referencing FIG.3C, the user interface 302 displays comments 350, 352 when the targetuser selects the button 348. Comment 350 by Sarah has text content “I'dlike to see him beat a bullet train.” Comment 352 by Nick is a responseto comment 350 and has text content “Hi I could do that!”

Content on a social-network page, such as a post or article, can havenumerous user-contributed comments, some of which may be of greaterinterest to a viewing user than others. In particular embodiments, theuser experience for reading and posting comments may be improved byidentifying comments that are likely to be of interest to viewing users,and displaying those comments in a prominent location, such as near thetop of the comment list. The comments of interest may be, for example,comments that people are reading and replying to, that provideinteresting context for and information relevant to the post, arewell-written, are written by authors known to write good comments, andso on. Comments of interest may be identified by determining scores forthe comments based on signal values, which may quantify features of thecomments and/or features of other entities in the social-networkingsystem, such as posts or users. The comments of interest may bepresented in an order according to their scores, with thehighest-scoring comments being presented at the top of the comment list.The comments may also be filtered, in which case comments that satisfyfiltering criteria, e.g., having scores above a threshold value, arepresented.

The signal values are, for example, related to aspects of comments,users, and user actions, such as the author of the comments, content ofthe comments, the audience of users who view and interact with thecomments (such as who the user's friends are, and what the user isinterested in), labelling of the comments by a text classifier, users'interactions with social-network news feeds, impression calculations inwhich impressions include interactions by historical users with thecomments, and other aspects of the social-networking environment thatinvolve interactions with comments and/or users.

In particular embodiments, the social-networking system 160 may retrievea plurality of comments associated with a content object. For example,the comments may have been submitted by users of the social-networkingsystem 160 as responses to a post. The comments may be retrieved by aserver 162 from a data store 164 hosted by the social-networking system160.

In particular embodiments, the social-networking system 160 maydetermine a score for each of the comments, where the score is based onone or more signals associated with the comment, and the signals arerelated to the identity of an author of the comment or to content of thecomment. FIG. 4A illustrates an example of signal values for thecomments 320-352 associated with the post 304 of FIG. 3A. The comments320-352 are numbered 1-12, respectively, in the signal table shown inFIG. 4A. The signals may be floating point values, and may be positivevalues to cause the comment to be up-ranked, or negative values to causethe comment to be down-ranked by the magnitude of the signal value. Inthe examples discussed herein, the signal values range from −1.0 to 1.0.The comments shown in FIG. 4A are from the example of FIGS. 3A-3C. Inparticular embodiments, signals may be associated with conditions toform conditional signals A conditional signal may have a signal valuewhen the associated condition is true. When the condition is false, theconditional signal may have no signal value, so that the signal does notapply and is not included in calculations that reference the signal. Thesignal may have a value of 0 when the condition is false, in which casethe value 0 may be used for the signal value in calculations thatreference the signal. The particular value of a conditional signal whenthe condition is false may be determined by instructions specific tothat signal. As an example and not by way of limitation, a geographicboost signal may have a positive value when a location associated with apost is in a certain geographic region. The geographic boost signal maybe a conditional signal that does not apply to the score calculationwhen no location is specified in the post. The geographic boost signalmay be a conditional signal that boosts the score when the locationassociated with the post is in the certain location, and does not affectthe score when no geographic location is specified in the post.

As introduced above, the values of the signals may be used to up-rankgood comments and down-rank bad comments. For example, a signal thatrepresents the quality of a content's grammar may have positivefloating-point values between 0 and 1 to indicate that the quality isgood. Positive signal values increase the comment's score. The comment'sscore may be based on a combination of the values of the comment'ssignals, e.g., an average of the signal values. Thus, a quality signalvalue of positive 0.7 adds a contribution of 0.7 to the sum of thesignals that contribute to the score, which is divided by the number ofcontributing signals to determine the comment's score. The signal mayhave negative values to indicate that the quality is bad, e.g., apoorly-written comment may have a quality signal value of −0.4, whichadds a contribution of −0.4 to the sum of the contributing signals,thereby decreasing the sum by 0.4 and lowering the average (and thus thecomment's score) accordingly. As another example, a signal thatrepresents the quality of a content's grammar may have positivefloating-point values between 0 and 1 to indicate that the quality isgood, and negative values between −1 and 0 to indicate that the qualityis bad. Positive signal values increase the comment's average score, andnegative signal values decrease the comment's average score.

In particular embodiments, the score for each of the comments may bedetermined based upon an average of the respective values of the one ormore signals associated with the comment. For example, the score for acomment may be calculated as the average of one or more of the signalvalues associated with the comment, as shown in FIG. 4A.

In particular embodiments, each signal may have a weight, and theaverage may be a weighted average in which the respective value of thesignal is multiplied by the weight of the signal. The average of thesignal values is used for the comment's score. Individual signals may beweighted by a weighting factor, e.g., a weight of 2 for the Valid URLsignal would give that signal twice the weight of other signals thathave a weight of 1 in a computation of a weighted average signal valueused for the score. For example, a signal value of 0.2 with a weight of2 would result in a contribution of 0.4 to the score, e.g., 4 timesgreater than a contribution of 0.1. Larger signal values such as 0.2and/or larger weights such as 2 may be used for signals that are deemedto be particularly important and are to have greater influence on thescore than signals that have smaller values and/or smaller weights. Theweights may be determined by manual inspection and data analysis, and/orautomated variation of weights, with A/B tests to verify whether themodel is producing good values for the weights, e.g., by determiningwhether user behavior changes in a positive way as weights are varied.

In particular embodiments, one of the signals may be based on anoriginality level for text of the content object or for one or moreimages of the content object. The social-networking system 160 maydetermine the originality level by identifying one or more clusters ofsimilar text in a corpus of text associated with the online socialnetwork. The originality level signal of the comment text may be isinversely proportional to a cluster size of the one or more clusters ofsimilar text. For example, a Text Originality signal may be set to apositive value, e.g., 0.1, if the comment text does not contain any ofthe clusters of similar text. The Text Originality signal may be set toa negative value, e.g., −0.1, if the text contains one of the clusters,to −0.2 if the text contains two of the clusters, and so on, to a signalvalue of −1.0 for more than a threshold number of clusters (e.g., 5).

In particular embodiments, one of the signals may be based on anoriginality level of photos that are included in comments. For example,photos that are unpopular on a page may cause the originality level tobe set to a negative value. As another example, photos that aredetermined to be memes, which are ordinarily not relevant to a specificconversation, may cause the originality level to be set to a negativevalue. Meme photos may be detected by, e.g., identifying photos thatappear in otherwise unrelated comment threads or posts.

In particular embodiments, one of the signals may be based on a grammarquality level of text of the content object. In particular embodiments,the social-networking system 160 may determine the grammar quality levelof the text of the content object by generating corrected text from thetext of the content object using a grammar correction algorithm, andcomparing grammar quality of the text of the content object to grammarquality of the corrected text, where the one of the signals isproportional to the similarity of the text of the content object to thecorrected text. For example, a Grammar Quality signal may be set to 0.5if no corrections to the comment text are identified, to 0 if a smallnumber of corrections are identified (e.g., 1 or 2 corrections), and to−0.1 or lower (with a magnitude proportional to the number ofcorrections identified) if more than the small number of corrections areidentified, to a lower limit of 1.0 for more than a threshold number ofcorrections (e.g., 10).

In particular embodiments, one of the signals may be based on whetherthe content object includes an invalid URL. As an example of a validURL, referencing FIG. 4A, for comment 1, the text content is “I readthis article on uknews.com” and the author is Emma. Comment 1 providesan example for the Valid URL signal because the comment text contains aURL. The Valid URL signal has the value 0.1 for the first commentbecause the URL (“uknews.com”) in the comment is valid (e.g., isregistered with a domain name service, or resolves to a web site thathosts a valid web page, or is otherwise determined to be valid). Thesignal value is set to positive 0.1, which indicates that the Valid URLsignal makes a positive contribution to the score for this comment,e.g., moves the comment in the upward direction (towards the top of thelist) by the magnitude of the signal (0.1). The signal value does notnecessarily cause the comment's ranking to change, since the magnitudeof the signal value may be insufficient to increase the score by anamount sufficient to exceed the score of the next-higher-ranked comment(if any). Other values may be used for the signal instead of 0.1, e.g.,0.01 to represent a smaller positive contribution, or 0.5 or 1.0 torepresent a larger positive contribution. The Valid URL signal is anexample of a conditional signal for which the condition is that thecomment contains a URL. If the comment does not contain a URL, then thevalue of the Valid URL signal may be set to 0.

As an example of an invalid URL, referencing FIG. 4A, comment 2 has text“Go to LowMortgateRates.com” and author Nick, and is an example commentfor which the Valid URL signal contributes a negative signal value tothe comment's score. In this example, the URL LowMortgageRates.com isknown or determined to be invalid (e.g., not registered with a domainname authority, and/or does not resolve to a valid web server or webpage). Since the URL is invalid, the signal value is set to −0.1, which,notwithstanding other signals, reduces the score and moves the commenttowards the bottom of the comment list by an amount equal to themagnitude of the signal (0.1). Including the value −0.1 in thecalculation of the average signal value reduces the average, andtherefore reduces the score of the second comment. As described abovefor positive signal values, other values may be used instead of −0.1,e.g., −0.01 to represent a less negative contribution, or −0.5 or −1.0to represent a greater negative contribution. Also, as indicated above,the signal may or may not cause the comment's ranking to change,depending on the difference between the comment's score and the score ofthe next-lowest-ranked comment (if any).

In particular embodiments, one of the signals may be based on arelevance comparison between text of the content object and text of thecomment. As an example, comment 4 has text “Is this really what headmounted cameras are meant for?” and author Sarah. Comment 4 isidentified as text that is relevant to the post, e.g., because comment 4mentions the phrase “head mounted cameras,” and that phrase, whichoccurs infrequently, and present in the post. The Relevant Text signalis therefore set to 0.1 for comment 4. The magnitude of the signal maybe set proportionally to a degree of relevancy of the comment text tothe post text. For example, if the comment text is determined to be veryrelevant, the signal may be set to 0.9 or 1.0. If the comment is foundto be slightly relevant, the signal may be set to 0.05 or 0.1. Thedegree of relevancy may be determined by measuring text similarity,e.g., by counting the number of words in common between the comment andthe post, such that the relevant text signal is proportional to thenumber of words in common, and the length of words and phrases that arepresent in both the comment and the post. As another example, a topic ofthe post text may be identified, e.g., “trains” or “cameras”, andcompared to topics of the comment text. The Relevant Text signal maythen be set proportionally to the number of topics in common. Forexample, if the topic “cameras” is identified in both the post and thecomment, then the relevant text signal may be increased by 0.1. If norelevant text is identified, then the relevant text signal may be set to0, as shown for comments such as “How do we know he actually did it”(comment 5) and “Hi Sarah Emma Nick” (comment 7), neither of which isidentified as relevant because of lack of words or topics in common withthe post. As another example, the comment text may be found to beirrelevant to the post text with high confidence, in which case therelevant text signal may be set to a negative value. For example,comments that are found to be promotional may also be considered highlyirrelevant, so the Invalid URL and Promotional Text comments havenegative values for their relevant text signals. Comments that containtext commonly found in irrelevant comments, e.g., “Go toLowMortgageRates.com” may have negative relevant text signals, as shownfor the Invalid URL signal.

In particular embodiments, one of the signals may be based on a level ofpromotional content identified in the comment. As an example, comment 3has text “My cousin made $900 on the Internet” and author Jake. Comment2 is identified as a promotional content, so the value of thePromotional signal is set to a negative value (−0.2 in this example) toprovide a negative contribution to the score for comment 2. The value ofthe Promotional signal may be proportional to the degree of thepromotion or to confidence in the determination that the signal ispromotional. For example, comment 3 may be identified as being morelikely to be promotional than comment 2, since comment 3 containscommonly-seen promotional language about making money on the Internet,and comment 2 refers to an unverified web site that may be considered akind of promotion. Therefore, the Promotional signal is set to −0.2 forcomment 3, and −0.1 for comment 2, since comment 3 appears to be morelikely to be a promotion than comment 2 (or, in other words, comment 3meets criteria for a type of promotion that is weighted as morepromotional than the type for which comment 2 meets criteria). In theexample of FIG. 4A, there are not positive values for the Promotionalsignal, because lack of promotional content is not considered to be astrong enough reason to up-rank a comment. In other examples, ifcomments that do not contain promotions are considered much moreinteresting or informative than comments that do contain promotions, apositive value may be assigned to the Promotional signal for commentsthat do not appear to contain promotions (e.g., have no promotionaltext).

In particular embodiments, one of the signals may be based on a level oftext entropy in the content of the comment. As an example of the TextEntropy signal, comment 6 has text “blah blah blah” and author Jake.Comment 6 is identified as text having low entropy, e.g., lowinformation content, because it merely contains the words “blah” and theword is repeated. Certain words, such as “blah” and “LOL” may berecognized as low-entropy content. Repetition of a word, particularly ifthere is no other text in the comment, may also be recognized aslow-entropy content. Other text, such as “???” or emoji symbols, mayalso be recognized as low-entropy content. Presence of low-entropycontent in a comment causes the Text Entropy signal to be set to anegative value, e.g., −0.1 for the text “blah bah blah” in comment 6.Low-entropy content may also be detected by counting the number of wordsin a post, and assigning a Text Entropy value of −1 to comments havingno text, −0.9 to comments having one character, −0.8 to comments havingone word, −0.7 to comments having two words, and so on, until at least athreshold number of words is found (e.g., 4), at which point the entropyis not based on the number of words. Text that repeats the same words orpatterns of characters may also be recognized as low-entropy content.Exceptions may be made for certain types of content, e.g., web links,which may have relatively few words and characters, but may be assignedan entropy signal value of 0, because they may refer to usefulinformation.

As another example of the Text Entropy signal, comments that are ofsubstantial length, e.g., greater than 100 words or 500 characters, orgreater than some other predetermined threshold, may be assigned apositive Text Entropy signal value. Comments that are extremely long,e.g., greater than 500 words or 2500 characters, may be assigned a TextEntropy signal value of 0, since such long comments are rare. Ifpresent, long comments may have been pasted from elsewhere, so theamount of useful information in a long comment is less likely to berelated to the length of the comment.

In particular embodiments, the social-networking system 160 maydetermine a ratio of unique user mentions in the comment to aquantifying value for the content of the comment, where, for at leastone of the excluded comments, the respective ratio satisfies a thresholdvalue. As an example, comment 7 has text “Hi Sarah Emma Nick” (orsimilarly, Hi @sarah @emma @nick) and author Jake. Comment 7 isidentified as having a relatively large number of unique user mentions.Such comments contain little content, especially when the number of usermentions or characters used for user mentions is a substantial portion(e.g., greater than 20% or greater than 80%) of the comment's text. Inthis example, since three of the four words in the comment are usermentions, the Ratio of Unique User Mentions signal is set to −0.1 as anegative contribution to the comment's ranking Since most comments arelikely to have no user mentions, there is no positive contribution tothe score for the Unique User Mentions signal in this example.

In particular embodiments, one of the signals may be based on areputation of the author of the comment. In particular embodiments, thereputation of the author may be based on a number of times contentattributed to the author has been (a) liked, (b) hidden, (c) marked asspam, or (d) replied to within a specified period of time. As anexample, the Author Reputation signal up-ranks comments made by authorswho have received positive feedback on their comments, based on actionstaken by other users on the author's comments (e.g., liking the commentsor replying to them within a threshold time). The Author reputationsignal down-ranks comments made by authors who have received negativefeedback on their comments, based on actions taken by other users on theauthor's comments (e.g., hiding the comments or marking them as spam).Two author reputation signals are shown in FIG. 4A: a static AuthorReputation signal based on comments to the current post, and a dynamicAuthor Reputation signal based on comments to a set of posts. The AuthorReputation signals may be calculated from the like count, hidden count,spam count, and reply in time count values associated with the post (forthe static author reputation), and/or with other posts, for the dynamicauthor reputation signal. The like count is a count of how many times anauthor's posts have been marked as liked. The hidden count is a count ofhow many times the author's posts have been hidden. The spam count is acount of how many times the author's posts have been marked as spam. Thereply in time count is a count of how many times the author's posts havebeen replied to by a comment within a threshold time, e.g., within 10minutes, 30 minutes, 1 hour, or the like.

The author reputation signal value may be determined using a ratio basedon those four counts, in which the like and reply-within counts arepositive contributions and the hidden and spam counts are negativecontributions. For example, the author reputation signal values may bedetermined using the formula (like+replywithin)/(hidden+spam), withvalues <0.5 shifted to negative numbers in the range (−1.0) andvalues >=0.5 shifted to positive numbers in the range (0.1).

The static author reputation values shown in the column labeled “Authorreputation (static)” of FIG. 4A may be calculated using the ratiodescribed above for the four count values (like, hidden, spam, and replyin time) of the single post for which the reputation is beingcalculated. Example total counts for the single post are shown in thetable of FIG. 4B under the label “Counts for this post.” These valuesare from the corresponding columns of FIG. 4A. The dynamic authorreputation values shown in the column labeled “Author reputation(dynamic)” may be calculated using the ratio described above foraverages of each of the four count values over a number of posts, suchas all posts viewed by the target user, all posts received in aspecified time period, or any other selected set of posts on which theauthor has commented. Example total counts for all posts are shown inthe table of FIG. 4B under the label “Total counts for all posts.”

The author reputation signals may be calculated based on thecomment-related action counts for each user that are shown in FIG. 4B.Three sets of action counts are shown in FIG. 4B. For each of the users,Jake, Nick, Sarah, and Emma, the link count, hidden count, spam count,and reply in time count for the current post (for the static authorreputation), labeled “Counts for this post,” for all other posts in theset of posts being considered (an intermediate value, e.g., all postshaving comments by at least one of the users for which the counts arebeing determined, optionally restricted to a certain time period),labeled “Counts for all other posts,” and the total counts for both thecurrent post and all other posts being considered (for the dynamicreputation), labeled “Total counts for all posts.”

The comments listed in FIGS. 3A-3C and 4A are ordered according to thetime at which they were received. For each comment, the signal tableincludes a description, the comment text, the author, a Valid URLsignal, a relevance signal, a promotional signal, a text entropy signal,a ratio of unique user mentions signal, an author verification signal, astatic author reputation signal, and a score (using the staticreputation value) that is an average of the aforementioned signals.

In particular embodiments, one of the signals may be based on a userverification status of the author. An Author Verified signal up-ranksthe comments of verified authors and makes no change to the ranking ofcomments by non-verified authors. Values for the Author Verified signalare shown in the “Author Verified?” column of FIG. 4A. In this example,the identities of the authors Emma and Nick have been verified, but theidentities of Jake and Sarah have not been verified. Author identitiesmay be verified using digital signatures, by receiving other proof ofthe author's identity, or by other appropriate means. Comments authoredby the verified authors Emma or Nick, such as comments 1 and 2,respectively, have the value 0.1 in the “Author verified?” field.Comments authored by the unverified authors Jake and Sarah, such ascomments 3 and 4, respectively, have the value 0 in the “Authorverified?” field.

In particular embodiments, one of the signals may be based on a numberof followers of the author in a social-networking system. In particularembodiments, the author quality signal may be further based onsatisfaction of a threshold for an author quality level. For example, anauthor quality signal for comments by a particular author may beproportional to the number of followers the author has, up to a limit of1.0 for a threshold number of followers (e.g., 100, 1000, 5000, or thelike). The author quality signal may be 0 if the author has nofollowers. If the author has at least 1 follower, the author qualitysignal may be set to 0.1. If the author has at least a threshold numberof followers, e.g., 100 or 1000, then the author quality signal may beset to a first value such as 0.2. If the author has more than thethreshold number of followers, the author quality may be set to s secondvalue such as 0.3. As another example, an author quality level signalmay be calculated as an average of the signal values of the authorsposts and/or comments. The average may be calculated for a particulartime, e.g., for all posts and/or comments made by the author in the pastmonth or year. Alternatively, the average quality level may be anaverage of a selected set of signals, such as the Grammar Quality signaland the Relevant Text signal, either for all posts or comments made bythe author, or for posts or comments made in a particular time period.

In particular embodiments, the social-networking system 160 may orderthe comments based on the respective scores. FIG. 5A illustrates anordering of the comments 320-352 according to static scores, which arescores calculated using the signals shown in the signal table, includingthe static author reputation but not the dynamic author reputation. Thatis, the comments shown in FIG. 5A are sorted by the “Total (staticrep.)” column in descending order. These comments may be presented to auser in the order shown in FIG. 5A. Although ordering in a particulardirection (e.g., the comment having the highest score is presented atthe top of the list, with up-ranking moving a comment toward the top ofthe list) and the highest-scoring comment being at a particular locationrelative to the other comments (e.g., the top of the list), ordering inother directions and placing the highest-scoring comment at otherlocations is contemplated. For example, the comments may be presented inorder of ascending score, in which case the comment having the lowestscore may be presented at the top of the comment list, and the commenthaving the highest score may be presented at the bottom of the commentlist. Further, up-ranking may refer to moving a comment to a positionthat indicates a higher ranking, and is not necessarily restricted tomoving a comment in an upward direction. Although scores are describedas floating-point values between −1 and 1, with increasing valuescorresponding to higher-ranked scores, other score representations arecontemplated. For example, this disclosure contemplates scores that maybe integer values, may be bounded other values, e.g., a lower limit of 1and an upper limit of 50, and/or may have other ordering relations,e.g., a relation in which higher values correspond to lower rankings

In particular embodiments, a comment that is a response to another“parent” comment may be ranked higher in the ordering than the parentcomment according to the scores assigned to each comment. In such cases,users may be surprised to see a response comment appear earlier in thelist than its parent. To maintain the thread context of the childcomment, a parent comment having a lower score than its child commentmay be up-ranked so that it is presented above the child, or the childhigher-scoring child comment may be down-ranked so that it is presentedbelow the parent. FIG. 5B illustrates an ordering of the comments320-352 according to scores based on dynamic author reputations. Thatis, the comments shown in FIG. 5B are sorted by the “Total (dynamicrep.)” column in descending order. Although this disclosure describesordering comments in a particular manner, this disclosure contemplatesordering comments in any suitable manner.

In particular embodiments, the social-networking system 160 may selectone or more of the comments, each of the selected comments meetingfiltering criteria. For example, the social-networking system 160 maypresent each comment that has a score satisfying a threshold value tothe user. The comments may be presented in order according to thedetermined ordering, e.g., sorted by score, such that the comment havingthe highest score that is greater than the threshold value is presentedas the first comment in the list. Alternatively, instead of selectingcomments having a score satisfying a threshold value, thesocial-networking system 160 may select no more than a second thresholdnumber, e.g., 1, 3, 5, 10, 15, or other desired number, of the commentshaving the highest scores, and present the selected comments. Theselected comments may then be presented in order according to thedetermined ordering. Although filtering according to particularconditions is described herein, filtering according to other conditionsis contemplated. For example, comments having scores less than athreshold may be presented instead of comments having scores greaterthan a threshold. Alternatively, instead of selecting comments having ascore greater than a threshold value, social-networking system 160 mayselect no more than a second threshold number, e.g., 1, 3, 5, 10, 15, orother desired number, of the comments having the lowest scores, andpresent the selected comments. The selected comments may then bepresented in order according to the determined ordering. Although thisdisclosure describes filtering comments according to criteria in aparticular manner, this disclosure contemplates filtering commentsaccording to any suitable criteria in any suitable manner.

In particular embodiments, the social-networking system 160 may presentone or more of the ordered comments to a target user. For example, thecomments may be displayed as shown in FIGS. 3A-3C, but in the ordershown in FIG. 5A or 5B. In particular embodiments, the social-networkingsystem 160 may exclude one or more of the comments based on filteringcriteria. For example, comments having scores below a threshold value,e.g., 0, −0.5, −0.1, or other appropriate value, may be excluded, e.g.,not presented to the user.

FIG. 6 illustrates an example method 600 for ranking and filteringcomments based on author-related and content-related features of thecomments. The method may begin at step 610, where the social-networkingsystem 160 may retrieve a plurality of comments associated with acontent object such as a post. At step 620, the social-networking system160 may prepare to repeat the subsequent steps (e.g., steps 630 through660) for each comment. At step 630, the social-networking system 160 mayprepare to repeat the subsequent step (e.g., step 640) for each signalthat is associated with the comment and related to the identity of anauthor of the comment and/or related to content of the comment. At step640, the social-networking system 160 may evaluate the signal associatedwith the current comment by determining a numeric value of the signalbased on the identity of the author of the comment and/or related tocontent of the comment, and store the determined numeric value in memoryfor use at step 660. At step 650, the social-networking system 160 maydetermine whether there is another one of the signals identified at step630 to evaluate, e.g., another signal that is associated with thecurrent comment and satisfies the conditions specified in step 630. Ifso, step 640 is executed again for the next signal associated with thecurrent comment. If there is not another signal to evaluate, step 660 isexecuted. Step 660 determines a score for the comment based on thenumeric value(s) of the signal(s) evaluated at step 640. At step 670,the social-networking system 160 may determine whether there is anothercomment to evaluate, e.g., another comment associated with the contentobject. If so, step 630 is executed for the next comment. If not, step680 is executed. At step 680, the social-networking system 160 maydetermine an ordering of the comments based on the respective scores.For example, step 680 may sort the comments by their scores, asdescribed above with reference to FIGS. 5A and 5B. At step 690, thesocial-networking system 160 may present each comment that has a scoresatisfying a threshold value to the user. The comments may be presentedin order according to the determined ordering. Alternatively, instead ofselecting comments having a score satisfying a threshold value, step 690may select a threshold number, e.g., 1, 3, 5, 10, 15, or other desirednumber, of comments, and present the selected comments. To present thecomments, the social-networking system 160 may cause the comments to bedisplayed, e.g., on a mobile device or a web browser located on a clientsystem 130.

Particular embodiments may repeat one or more steps of the method ofFIG. 6, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 6 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 6 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for rankingand filtering comments based on the author-related and content-relatedfeatures of the comments including the particular steps of the method ofFIG. 6, this disclosure contemplates any suitable method for ranking andfiltering comments based on the author-related and content-relatedfeatures of the comments including any suitable steps, which may includeall, some, or none of the steps of the method of FIG. 6, whereappropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 6, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 6.

In particular embodiments, comments on social-network pages may beranked and filtered based on one or more audience interactions with thecomment. For example, a score may be determined for each of thecomments. The score may be based on one or more signals, the signalsbeing associated with the comment and related to interactions byaudience members with the comment. The audience members may be, e.g.,social-network users, who may be separate from the target user and thecomment author. These audience interactions may include how users in theauthor's social network or admins have been interacting with thecomment, and the author's responses to those interactions.

The terms “up-ranked” and “down-ranked” are used herein to refer toadding a positive signal value to a comment's score or subtracting asignal value from the comment's score, respectively. The magnitude ofthe quantity that is added or subtracted may depend on the strength ofthe signal, e.g., how many data points have contributed to the signalvalue, or how many times an action or condition that causes the signalto be set has occurred. The magnitude may also depend on the importanceof the signal to an administrator or other person who configures thecomment ranking system. For example, if an interaction by a targetuser's friend with a comment is found to be a good indication that thetarget user will like the comment, then a signal that corresponds topresence of a friend interaction with the comment may be set to arelatively large value, e.g., 0.5, when such a friend interaction isidentified. Conversely, if friend interactions are a weak but positiveindication that the target user will like the comment, then the signalmay be sent to a relatively small value, e.g., 0.05 or 0.1. As anotherexample, if friend interactions indicate that the target user will notlike the comment, then the signal may be set to a negative value, e.g.,0.1 or 0.2. Changing the magnitude based on the importance or otherproperty of the signal may also be achieved by associating a weightvalue with the signal, e.g., a weight of 5 to multiply the value 0.1 by5. In this case, the signal value may be normalized or limited to amaximum of 1.0 so that the values remain in the range −0.1 to 1.0. Thus,the signal value magnitude may be varied based on information thatvaries for a particular comment, such as the number of friends who likeda specific comment. To change the signal magnitude for all comments, thesignal magnitude may be weighted by a weight value associated with thesignal. As an example, if the user posts the same comment on manydifferent pages, or consistently posts the same photo, or the user'scomments are consistently marked as spam, then the user's comments aredown-ranked. In this example, to down-rank the comments, a signal valueis set to a negative value, e.g., −0.1, −0.5, or the like.

In particular embodiments, the social-networking system 160 may retrievea plurality of comments associated with a content object. For example,the comments may have been submitted by users of the social-networkingsystem 160 as responses to a post. The comments may be retrieved by aserver 162 from a data store 164 hosted by the social-networking system160.

In particular embodiments, the social-networking system 160 maydetermine a score for each of the comments, where the score is based onone or more signals associated with the comment, the signals are relatedto one or more audience interactions with the comment, and each of theaudience interactions comprises an interaction by a respective audiencemember with the comment. In particular embodiments, each of the audienceinteractions further comprises one or more responses to the audienceinteraction by an author of the comment. As an example and not by way oflimitation, an audience member may be a user of the social-networkingsystem 160.

In particular embodiments, the one or more signals may be based onexistence of an edge between a user node representing the audiencemember and a user node representing an author of the comment in a socialgraph on the social-networking system. As an example and not by way oflimitation, the audience-related features may include how users in theauthor's social network, e.g., the author's friends, have beeninteracting with the comment, and what the author's responses are tothose interactions. As another example, comments authored by friends orother social connections of a target user (e.g., the user viewing thecomments) may be up-ranked. When a friend of the target user makes acomment, even if the quality is low according to other signals, becausethe commenter is a friend, the comment still has some value to thetarget user, and is up-ranked. The ranking of a comment may also bebased on how many friends of the comment owner (e.g., author) and/or howmany administrators (or moderators) liked the comment.

In particular embodiments, the one or more signals may be further basedon a topic referenced in the comment, where the audience member hasinteracted with another comment that references the topic. A user'sfriends' comments may be up-ranked based on topics the user hasinteracted with. For example, if the user and a friend of the user haveboth interacted with the same topic, e.g., “Trains,” then the friend'scomments may be up-ranked.

In particular embodiments, the audience member may be an administrator(or moderator). Comments may be ranked based on how administratorsinteract with comments. Administrators may include moderators. Forexample, comments made by administrators may be up-ranked, sinceadministrators are likely to make important announcements and/or arelikely to have authority and need to be able to communicate importantinformation to other users. The ranking of a comment may be based on howmany administrators (or moderators) liked the comment.

In particular embodiments, the one or more signals may be based ondetecting that the audience member is an author of the content object orthe comment. Ranking may be based on whether the owner (e.g., author) ofthe post is also the author of the comment. For example, comments madeby the owner of the post may be up-ranked because the owner hasknowledge of the post content and is therefore more likely to createcomments that are relevant to the post. As an example and not by way oflimitation, a comment made by an owner may be moved to the top of thecomments, e.g., by setting the a signal for owner comments to a specialvalue that causes the post to be moved to top of the comment list. Inthis way, additional content, corrections, or clarifications may beadded to the post, as comments, in a way that is likely to be seen byother users reading the post. In particular embodiments, the one or moresignals are based on how many of the one or more comments were authoredby an author of the content object. For example, the signal for ownercomments may be proportional to the number of comments that wereauthored by the author of the post.

In particular embodiments, the one or more signals may be based ondetecting that the content object and the comment have the same author.Ranking of a comment may be based on responses from the author of thepost. If the original author responds to someone, then, orthogonal tothe quality of that comment, the interaction causes the comment to beup-ranked.

In particular embodiments, the one or more signals are for a specificaudience interaction and may be based on detecting that the audiencemember follows an author of the comment on the online social network.For example, comments made by users who are followed by the post'sauthor on the online social network may be up-ranked. By following thecommenting users, the post's author has indicated that he or she truststhe commenter' views to some extent. As another example, if the audiencemember who interacts with a comment follows the author of the comment,then the comment may be up-ranked because by choosing to follow thecomment author, the audience member has indicated that he or she islikely to self-identify as part of the comment author's page orprofile's community. A first user following a second user is a strongindication that the first user wishes to see more of the second user'scontents, and the second user's comments on public threads may beup-ranked to the top of the thread (which may be ordered by score) whenthe thread is presented to the first user. As another example, when apost shows up in a list of trending posts, some authors of comments arenot connected to the author of the post, and are not part of the postauthor's page or profile's community of the author of the post. Commentauthors who are not connected to the post author of the post may belikely to leave lower-quality comments than comment authors who areconnected to the post author.

In particular embodiments, the one or more signals are for a specificaudience interaction and may be based on detecting that an author of thecontent object follows an author of the comment on the online socialnetwork. Ranking may be based on whether the owner (e.g., post author)follows the comment author on the social-networking system. For example,if the owner follows the comment author, then the comment author islikely to be of interest to the owner and therefore to readers of theowner's posts. Accordingly, comments made by authors who are followed bythe owner may be up-ranked.

In particular embodiments, the one or more signals may be based ondetecting that the audience member has viewed the content object. Inparticular embodiments, the one or more signals may be further based onan amount of time during which the audience member viewed the contentobject. Users who have read a post or article will likely createhigher-quality content than users who see the post in their feed and donot read the post's content. For example, a user who sees the title oran excerpt of the post and happens to have a strong opinion about asubject related to the post may write a comment that is not directlyrelated to the content of the post. A Viewed by Users signal mayrepresent whether users have viewed the post (e.g., a positive value ifso, or 0 if not). As an example and not by way of limitation, a postthat is displayed to or interacted with by a user is considered to beviewed by the user. The Viewed by Users signal may be proportional tothe number of users who have viewed the post. In particular embodiments,the one or more signals for the specific audience interaction arefurther based on an amount of time during which the audience memberviewed the content object, and the amount of time is measured as betweena time at which the tap interaction is received and a time at which theinstructions to navigate away from the article are received. The Viewedby Users signal may also be proportional to the time that users havespent viewing the post. This signal may be based on whether thecommenter scrolled through the article (which causes the post to beup-ranked) or just tapped on it and then quickly moved on to viewsomething else.

In particular embodiments, the one or more signals are for a specificaudience interaction and may be further based on receiving a tapinteraction to scroll through the article then receiving instructions tonavigate away from the article within a threshold time of the tapinteraction. For example, the comment may be down-ranked if thecommenter viewed the post for a very short time. The score may beunchanged (e.g., signal value=0) if the commenter spent at least athreshold amount of time reading the post and/or scrolled through thepost. As an example and not by way of limitation, this information aboutwhether users viewed or interacted with a post may be measured based onlink navigation in an application or web browser.

In particular embodiments, the one or more signals may be based on alanguage in which the comment is written. In particular embodiments, thecomment is excluded when the language in which the comment is written isnot associated with the profile for the target user and the language inwhich the content is written differs from the language in which thecomment is written. Ranking may be based on whether the comment wasliked predominately by people with a different primary language fromthat of the source post. If so, the comment may be down-ranked, becauseit is unlikely to be understood by most readers of the post, or may bespam or otherwise irrelevant to the post. In particular embodiments, theone or more signals may be further based on detecting that the languagein which the comment is written is associated with a profile for thetarget user or detecting that a language in which the content object iswritten is associated with a profile for the target user. As an example,if a comment is in a language not spoken or understood by the user(e.g., as determined by the user's profile, or by inference based onobservation of the user's language interactions), then the comment maybe filtered from user's view so that it is not seen by the user, unlessthe comment is posted by another user who the user already follows.

In particular embodiments, the one or more signals may be based ondemographic information associated with the audience member. Ranking maybe based on demographic information about users. As an example,nationality information may be used to rank posts or comments. The textof posts and comments may be search for a country name, such as a poststating “Come to Turkey.” Such a post containing the name of a countrymay be down-ranked if it is liked or otherwise interacted with by userswho are primarily from Turkey, because those users may have anationalistic bias. Images of national flags and meme photos related tonationalities may also be down-ranked. As another example, if a post orcomment is only or primarily liked by users who are primarily from asingle country, and the comment is short or has signals indicating lowgrammar quality, then the post may be nationalistic and may consequentlybe down-ranked. The term “primarily” as used herein may mean, e.g., 75%or more, 85% or more, 90% or more, 95% or more, or another percentageclose to or equal to 100%. As still another example, if a user posts aBrazilian flag, and most of the people who like the flag posting arefrom Brazil then the content is disproportionately interacted with bypeople from a country related to the post. Thus, the effect of theinteraction with a post or comment related to a country can bediscounted or modulated by down-ranking comments made by users who arefrom that country.

FIG. 7 illustrates an example method 700 for ranking and filteringcomments based on the audience-related features. The method may begin atstep 710, where the social-networking system 170 may retrieve aplurality of comments associated with a content object such as a post ina social-networking system. At step 720, the social-networking system170 may prepare to repeat the subsequent steps (e.g., steps 730 through760) for each comment. At step 730, the social-networking system 160 mayprepare to repeat the subsequent step (e.g., step 740) for each signalthat is associated with the comment and related to one or more audienceinteractions with the comment. Each of the audience interactions may bean interaction by a respective audience member with the comment. At step740, the social-networking system 160 may evaluate the signal associatedwith the current comment by determining a numeric value of the signalbased on the audience interactions with the comment, and store thedetermined numeric value in memory for use at step 760. At step 750, thesocial-networking system 160 may determine whether there is another oneof the signals identified at step 730 to evaluate, e.g., another signalthat is associated with the current comment and satisfies the conditionsspecified at step 730. If so, step 740 is executed again for the nextsignal that is associated with the current comment and satisfies theconditions of step 730. If there is not another signal to evaluate, step760 is executed. Step 760 determines a score for the comment based onthe numeric value(s) of the signal(s) evaluated at step 740. At step770, the social-networking system 160 may determine whether there isanother comment to evaluate, e.g., another comment associated with thecontent object. If so, step 730 is executed for the next comment. Ifnot, step 780 is executed. At step 780, the social-networking system 160may determine an ordering of the comments based on the respectivescores. For example, step 780 may sort the comments by their scores, asdescribed above with reference to FIGS. 5A and 5B. At step 790, thesocial-networking system 160 may present each comment that has a scoresatisfying a threshold value to the user. The comments may be presentedin order according to the determined ordering.

Particular embodiments may repeat one or more steps of the method ofFIG. 7, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 7 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 7 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for rankingand filtering comments based on audience-related features of thecomments including the particular steps of the method of FIG. 7, thisdisclosure contemplates any suitable method for ranking and filteringcomments based on audience-related features of the comments includingany suitable steps, which may include all, some, or none of the steps ofthe method of FIG. 7, where appropriate. Furthermore, although thisdisclosure describes and illustrates particular components, devices, orsystems carrying out particular steps of the method of FIG. 7, thisdisclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 7.

In particular embodiments, comments may be ranked and filtered forpresentation to target user based on a history of user interactions withthe target user's newsfeed. User interactions with a newsfeed mayinclude a user liking, posting, or sharing a comment on the targetuser's newsfeed. Other possible interactions include a user marking acomment as disliked, spam, or hidden. A user friending, unfriending,following, or unfollowing another user may also be consideredinteractions with a newsfeed. Each interaction that relates to a commentmay be evaluated to determine a numeric signal value, e.g., a positiveor negative value to be added to the comment's ranking score. The signand magnitude of the value may be determined by a signal that isselected based on the type of interaction. The signal may specify astatic value or a dynamic rule that can generate a value based on thespecific interaction. For example, a user liking a comment maystatically set the signal value to a positive value, e.g., 0.1. A userinteraction of marking a comment as spam may statically set the signalvalue to a negative value, e.g., −0.2. The target user friending anotheruser (e.g., as a result of or in relation to a newsfeed interaction suchas viewing or liking a comment) may dynamically set the signal value to0.1 if the other user is an administrator, or to a value inverselyproportional to the degree of separation between the target user and theother user in the social graph (e.g., 0.9 for a first-degree friend, 0.6for a third-degree friend, and so on). The signal values determinedbased on feed interactions related to a comment may be added to thecomment's ranking score to influence the position of the comment in thelist produced by the ranking and filtering operations.

FIG. 8 illustrates an example method for ranking and filtering commentsbased on interactions of the user viewing the comments with one or moresocial networking feeds. The method may begin at step 810, where thesocial-networking system 160 may retrieve a set of comments associatedwith a content object such as a post. At step 820, the social-networkingsystem 160 may prepare to repeat the subsequent steps (e.g., steps 830through 860) for each comment in the set. At step 830, thesocial-networking system 160 may prepare to repeat the subsequent step(e.g., step 840) for each signal that is associated with the comment andrelated to a history of user interactions by a target user with thecomment. Step 830 may identify each signal as described below withreference to FIG. 11. At step 840, the social-networking system 160 mayevaluate the signal associated with the current comment by determining anumeric value of the signal based on the history of user interactions bythe target user with the comment, as described below with reference toFIG. 11. Step 840 may also store the determined numeric value in memoryfor use at step 860. At step 850, the social-networking system 160 maydetermine whether there is another one of the signals identified at step830 to evaluate, e.g., another signal that is associated with thecurrent comment and satisfies the conditions specified in step 830. Ifso, step 840 is executed again for the next signal associated with thecurrent comment. If there is not another signal to evaluate, step 860 isexecuted. Step 860 determines a score for the comment based on thenumeric value(s) of the signal(s) evaluated at step 840. At step 870,the social-networking system 160 may determine whether there is anothercomment to evaluate, e.g., another comment in the set. If so, step 830is executed for the next comment. If not, step 880 is executed. At step880, the social-networking system 160 may determine an ordering of thecomments based on the respective scores. For example, step 880 may sortthe comments by their scores, as described above with reference to FIGS.5A and 5B. At step 890, the social-networking system 160 may presenteach comment that has a score satisfying a threshold value to the user.The comments may be presented in order according to the determinedordering.

Particular embodiments may repeat one or more steps of the method ofFIG. 8, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 8 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 8 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for rankingand filtering comments based on the author-related and content-relatedfeatures of the comments including the particular steps of the method ofFIG. 8, this disclosure contemplates any suitable method for ranking andfiltering comments based on the author-related and content-relatedfeatures of the comments including any suitable steps, which may includeall, some, or none of the steps of the method of FIG. 8, whereappropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 8, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 8.

FIG. 11 illustrates an example of user interactions with a newsfeed1120. The newsfeed 1120 may be a list of content objects, such as postsand their associated comments. The newsfeed 1120 is associated with atarget user 1102 (“Sarah”), who may create and view posts on thenewsfeed 1120. A user interface that represents the newsfeed 1120 may bepresented to the target user 1102, e.g., in a web browser or applicationexecuting on client system 130. In particular embodiments, the newsfeed1120 may present posts 1122, 1128 and respective comments 1124, 1130replying to the posts. The posts and comments presented on a user's newsfeed 1120 may have been authored by the target user or by other users(subject to permission restrictions associated with the newsfeed 1120).

In the newsfeed 1120, a first post 1122 has an author “Nick” and textcontent “Man Beats Train.” A first comment 1124 replying to the firstpost 1122 has an author “Emma” and text “I read this article onuknews.com.” A second post 1128 has an author “Sarah” and text content“Avengers: Age of Ultron trailer.” A second comment 1130 replying to thefirst post 1122 has an author “Emma” and text “I read this article onuknews.com.” The user interface that represents the newsfeed 1120 may beresponsive to user input such as commands that enable the target user1102 to post, like, dislike, share, or hide a comment, create a newpost, friend, follow, unfriend, and unfollow other users, and so on.Further details of the newsfeed 1120 are provided elsewhere herein. Thenewsfeed 1120 may present other content in addition to or instead of theposts and comments shown.

In particular embodiments, the target user 1102 (“Sarah”) may interactwith the social-networking system 160, e.g., by “liking” a comment 1124that is displayed on the newsfeed 1120. Such an interaction may berepresented by a newsfeed interaction 1104, which may be sent from theclient system 130 of the target user 1102 to the social-networkingsystem 160. The social-networking system 160 may perform the newsfeedinteraction 1104, e.g., by incrementing a “liked” counter associatedwith the comment 1124. The social-networking system 160 may also presenta user interface element 1122 (e.g., “1 Like”) representing the newsfeedinteraction 1104 in the newsfeed 1120.

In particular embodiments, the social-networking system 106 may store arecord of each newsfeed interaction 1104 in a user-interaction log 1118as a logged interaction 1116. That is, each logged interaction 1116 mayreference or include a newsfeed interaction, 1104 e.g., a like, post, orthe like. The logged interaction 1116 may include other types ofinteractions between users and the social-networking system as well,such as responses from the social-networking system 160 to the useractions. As an example and not by way of limitation, there may bemultiple user-interaction logs 1118, each specific to a particulartarget user 1102 (e.g., as the interaction log 1118 is specific to theuser 1102 (“Sarah”) in the example of FIG. 11). Alternatively, a singleuser-interaction log 1118 may store logged interactions for multipleusers, with each logged interaction identifying a user associated withthe logged interaction.

As an example and not by way of limitation, the social-networking system160 may generate a logged interaction “Like C2” 1117 for Sarah inresponse to Sarah's “Like Comment 2” action 1104 indicating that Saralikes the second comment 1130. That is, the “Like C2” 1117 loggedinteraction represents the “Like Comment2” newsfeed interaction in whichSarah liked the second comment 1130 (“Great movie”). Thesocial-networking system 160 may store the logged interaction “Like C2”1117 in the user interaction log 1118. The social-networking system 160has also generated and stored other logged interactions in theinteraction log 1118. These other logged interactions are referred toherein as historical interactions 1116. The historical interactions 1116include a “Post P2” logged interaction in the user interaction log 1118indicating that Sarah posted the second post 1128 (“Avengers: Age ofUltron trailer”), a “Dislike C1” logged interaction indicating thatSarah disliked the first comment 1124 (“I read this article . . . ”),and a “Hide C1” logged interaction indicating that Sarah hid the firstcomment 1124. FIG. 11 shows additional newsfeed interactions that havenot been stored in the interaction log 118, including a “Post Comment 2”newsfeed interaction 1108 received from the newsfeed 1120. Theinteraction log 1118 may be a file, database, in-memory data structure,or other form of storage in in which the interactions are stored. Theinteraction log 1118 and newsfeed 1120 may be stored in the data store164, memory 1204, and/or storage 1206 of a server 162 of thesocial-networking system 160.

In particular embodiments, the social-networking system 160 may retrievea set of comments associated with one or more content objects. Thecomments may have been submitted by users of the social-networkingsystem 160, e.g., as responses to a post. The comments may be stored inand retrieved from the data store 164 by the server 162 of thesocial-networking system 160.

In particular embodiments, the social-networking system 160 maydetermine a score for each of the comments for a selected one of thecontent objects, where the score for each of the comments is based onone or more signals associated with the comment, and the signals arerelated to a history of user interactions by a target user with one ormore of the comments in the set. In particular embodiments, a signalgenerator 1114 may generate signals 1115 based on newsfeed interactions1102, 1106, 1110, logged interactions 1116, or on a combination thereof.Each of the signals 1115 has a numeric value that contributes to commentranking scores, as described in further detail with reference to FIG.4A. In the example shown in FIG. 4A, the “Post P2”, “Dislike C1”, and“Hide C1” logged interactions 1116 are historical interactions thatoccurred prior to the “Like Comment2” newsfeed interaction 1104, whichis a “current” interaction, e.g., the most recent interaction. The “LikeComment2” newsfeed interaction 1104 has been stored in the interactionlog 1118 as a current interaction 1117 (“Like C2”). The currentinteraction 1117 may become a historical interaction 1116 when the nextinteraction occurs and is stored in the log 1118. Signal generator 1114may generate the signals 1115 based on one or more of the historicalinteractions 1116.

In particular embodiments, the user interactions 1104 by the target user1102 with one of the comments 1124, 1130 may include liking orcommenting on the comment or liking or commenting on the content object1122, 1128 associated with the respective comment. A comment scoregenerator 1134 may generate comment scores, such as a score 1126, basedon the signals 1115. The comment scores may be used to rank the comments1104, 1104, 1112 (and/or posts 1122, 1128). The score 1126 may be basedon a signal (e.g., a Comment Liked signal) that the signal generator1114 generates when it processes the “Like Comment2” newsfeedinteraction 1112. For example, the signal generator 1114 generates acomment score of 0.4 for the Comment Liked signal in the example of FIG.11. As described above, the “Like Comment1” newsfeed interaction 1112may also cause the social-networking system 160 to store the currentinteraction 1176 (“Like C2”) in the user-interaction log 1118. Thus,each newsfeed interaction 1104 may cause one or more correspondingsignals 1115 to be generated, and may also cause a corresponding loggedinteraction to be stored in the user interaction log 1118.

The newsfeed interactions between users 1102, 1106, and 1110 and thenewsfeed 1120 may include liking, commenting on, or sharing a post orcomment, disliking, hiding, or marking as spam a post or comment, andfriending, following, unfriending, or unfollowing a user (e.g. a userwhose name is shown in the newsfeed 1120). As described above, thesignal generator 1114 may generate signals based on the interactions,and the signals may be converted to scores on the posts or commentsassociated with the interactions. The interactions may be divided intopositive, neutral, and negative interactions. Positive interactions,such as liking or sharing a post, or friending or following a user, maybe converted to positive scores, e.g., 0.1, 0.4 or the like. Neutralinteractions, such as commenting on or replying to a post, may beconverted to a score of 0, since a comment may be have a positive ornegative meaning. Negative interactions, such as disliking, hiding, ormarking as spam a post or comment, or defriending or unfollowing a user,may be converted to negative scores, e.g., −0.1, −0.4, or the like.

In particular embodiments, a static value or dynamic rule may beassociated with each of the signals 1115 to determine the sign andmagnitude of the signal value 1126 generated by a comment scoregenerator 1134. For example, an interaction in which a user likes acomment may statically set the signal value to 0.1. An interaction inwhich the target user friends another user (e.g., as a result of or inrelation to a newsfeed interaction such as viewing or liking a comment)may dynamically set the signal value to 0.1 if the other user is anadministrator, or to a value inversely proportional to the degree ofseparation between the target user and the other user in the socialgraph (e.g., 0.9 for a first-degree friend, 0.6 for a third-degreefriend, and so on).

In particular embodiments, the user interactions by the target user withone of the comments may include friending another user who is related tothe content object associated with the comment or to the comment. Forexample, the target user Sarah 1102 may have friended user Nick 1110,who posted post 1122 (“Man Beats Train”), and a record of the friendinginteraction may be stored in the user interaction log 1118. Since Nickposted the post 1122, Nick is related to the post 1122. The comment 1124for the post 1122 may be scored based on one or more signals associatedwith the comment 1124, where the signals are related to the history ofuser interactions (e.g., the interaction log 1118). As an example andnot by way of limitation, a signal named “Author is Friend” may beprovided to detect this situation, e.g., that the author of a contentobject associated with a comment is a friend of the target user (or anadministrator). The signal generator 1114 may receive the friendedinteraction between the target user and Nick from the interaction log1118, and match the interaction with the Author Is Friend signal. The“Author is Friend” signal may have a rule that determines the value ofthe signal, e.g., as 0.2 if the author is an administrator, or as avalue inversely proportional to the degree of separation between thetarget user and the author in the social graph (e.g., 0.9 for afirst-degree friend, 0.6 for a third-degree friend, and so on). As aresult, the ranking of the comment authored by the friend may beincreased by an amount inversely proportional to thedegree-of-separation between the friend and the target user.

In particular embodiments, the user interactions by the target user withone of the comments may include disliking, hiding, or unfriendinganother user related to the content object associated with the commentor to the comment. These interactions may be processed similarly to thefriending interaction described above, except the score is set to anegative value for disliking, hiding, or unfriending another user. As anexample, different negative values may be used for each type of negativeinteraction, e.g., −0.3 for disliking, −0.2 for hiding, or −0.1 forunfriending. Other values may be chosen as desired, or based on A/Btesting that determines the effectiveness of different scores.

In particular embodiments, the user interactions by the target user withone of the comments may include disliking or hiding the comment. Forexample, a signal named Comment Disliked may be used by the signalgenerator 1114 to detect that one of the comments in the target user'snews feed 1120 has been disliked (e.g., marked as not liked) by a friendof the target user or by an administrator (or, alternatively, by anyuser). A disliked interaction may be stored in the interaction log 1118and received by the signal generator 1114. The signal generator 1114 maymatch the disliked interaction with the “Comment Disliked” signal, and ascore may be determined according to a rule specified by the signal. Forexample, the score may be set to −0.2, so that the total score isreduced by 0.2 for each disliked interaction in the log 1118 (until aminimum value of −1.0 is reached). A “Comment Hidden” signal may bedefined to handle hidden comment interactions similarly, reducing thetotal score by, e.g., 0.1 for each time the comment is hidden by afriend of the target user or an administrator (or, alternatively, by anyuser).

In particular embodiments, the one or more content objects may bepresented in a newsfeed for the target user. For example, a post 1122,“Man Beats Train” and a post 1128 “Avengers: Age of Ultron trailer” arepresented in the target user's news feed 1120 of FIG. 11.

In particular embodiments, other users 1106 (“Emma”) and 1110 (“Nick”)may interact with the target user's newsfeed 1120. For example, a postby Nick appears on Sarah's newsfeed, and Emma comments on the post.These interactions may appear on the target user Sarah's newsfeed 1120because the target user is following Nick or Emma, or because Nick orEmma specifically directs interactions to Sarah's newsfeed. As anexample and not by way of limitation, the posts and comments fromanother user on the target user's news feed 1120 may becreated/published on the other user's news feed, and may then bedisplayed by the social-networking system 160 on the target user's newsfeed 1120 because the target user follows the other user, or because theother user posts the posts or comments on the target user's newsfeed1120.

In particular embodiments, the signals 1115 may be based on a history ofuser interactions 1118 by one or more other users 1106, 1110 with one ormore of the comments 1122, 1128 in the set, where the other users 1106,1110 are connected to the target user 1102 in the social-networkingsystem. The other users 1106, 1110 may be friends of the target user1102 or administrators in the social-networking system 160. Inparticular embodiments, the one or more signals may be based on likes ofthe comment 1124 by one or more friends of the target user. For example,interactions 1108 by other users 1106 with the target user's newsfeed1120 may be stored in the target user's interaction log 1118, in whichcase each of the interactions stored in the log 1118 may be associatedwith the user 1106 who performed the interaction 1108. Alternatively,there may be separate user interaction logs for each user, and thesignal generator 1114 may retrieve historical interactions for eachinteraction 1108 with the newsfeed 1120 from the interaction log for theuser 1106 associated with the interaction 1108. Interactions 1108 byother users 1106 with comments 1122, 1128 in the set may include any ofthe positive, neutral, or negative interactions described above, andsignals may be generated for the interactions by other users based ontheir interactions 1108 as described above for interactions by thetarget user. As an example and not by way of limitation, comments madeby friends of the target user may be moved to the top of the list ofcomments, since the target user is likely to be interested in commentsby friends regardless of the content of the comments.

In particular embodiments, the signals may be based on a topicassociated with the comment, where the topic is further associated withone or more stories previously viewed by the target user. For example,suppose that a user posts a comment referencing a particular city andinteractions happening in that city in a conversation thread. For mostusers, comments referencing the city would not be of particularinterest, and should not be ranked highly in the thread. However, if auser has been reading stories, posts, or comments about that city intheir newsfeed, then comments referencing the city may be up-ranked inthe thread, e.g., by receiving a relatively high score such as 0.5,0.75, or the like. A signal named “Topic Match” may identify topics incomments and posts, e.g., using a topic tagger based on amachine-learning algorithm. If a particular topic is found in multipleposts or comments in a user's newsfeed, then the comments (and/or posts)containing the topic may be up-ranked by receiving a relatively highscore. The score may be proportional to the number of posts and/orcomments in which the topic occurs. If the target user has visited webpages, articles, or other posts, or there is otherwise an indicationthat the target user has read the posts and/or comments in which thetopic appears, then the score may be increased by an additional factor,e.g., by adding 0.2, because of the additional certainty that the useris interested in the topic.

In particular embodiments, the ranking of comments in the target user'sfeed may be based on interactions by friends of the target user with thetarget user's feed or with other feeds. For example, the signals mayup-rank comments made by a user's friends or other social connections.When a friend makes a comment, even if the quality is low according toother features, because the commenter is a friend, the comment still hassome value to the user, and is up-ranked. For example, commenting byreferencing a particular city and interactions happening in that city.In the aggregate view, for most people, comments referencing the citywould not ordinarily be highly-ranked in the thread. However, if a userhas been reading stories about that city in their feed, then based onthe user's feed interaction history, comments referencing that city areup-ranked in the thread.

In particular embodiments, the Reputation signal may determine areputation value based on newsfeed interactions. The Reputation signalrules may involve searching a comment author's history of interactions.If the user's history of interactions indicates that the user posts thesame comment on multiple different pages, or consistently posts the samephoto on different pages, or if the user's comments are consistentlymarked as spam, then the user's reputation score may be set to anegative value to down-rank the user's comments. The negative score maybe proportional to the number of different pages on which the samecomment or photo is posted, and/or to the number or percentage of theuser's comments that are marked as spam according to the user'sinteraction log.

In particular embodiments, a labeling technique may be used to identifyone or more labels that characterize the content of a comment, and toperform comment ranking and filtering based on the identified labels.The labeling technique may use a comment classifier that identifies oneor more labels under which the comment may be classified, such asAnecdotal, Eloquent, Descriptive, Promotional, and others. For example,a comment may be labeled promotional if it contains content deemedpromotional, e.g., “Like me”, “Follow me”, etc. A comment may be labeledEloquent if it contains good grammar. The ranking of comments may bebased on ranking scores associated with each comment, and a comment'sranking score may be a sum of the signal values that are based on thecomment. Each of the labels identified for a comment may be mapped to apositive or negative signal value. Labels that denote positivequalities, such as the Eloquent and Descriptive labels, are mapped topositive signal values that contribute to raising the comment's rankingscore. Labels that denote negative qualities, such as the Promotionallabel, are mapped to negative signal values that contribute to loweringthe comment's ranking score. Thus the signal value(s) used to score acomment may be based on the label(s) identified for the comment, and onother factors such as a confidence value associated with each label bythe comment classifier. The sign and magnitude of the value may bedetermined by the label, and may be determined by a static value or adynamic rule associated with the label.

FIG. 9 illustrates an example method for ranking and filtering commentsbased on comment labelling. The method may begin at step 910, where thesocial-networking system 160 may retrieve a plurality of commentsassociated with a content object such as a post. At step 920, thesocial-networking system 160 may prepare to repeat the subsequent steps(e.g., steps 930 through 960) for each comment. Step 930 may identifyone or more labels that apply to the comment using a comment classifierbased on content associated with the comment, as described below withreference to FIG. 12. At step 940, the social-networking system 160 mayprepare to repeat the subsequent step (e.g., step 950) for each labelthat applies to the comment. At step 950, the social-networking system160 may identify a signal that corresponds to the label and evaluate thesignal by determining a numeric value for the signal based on the label,as described below with reference to FIG. 12. Step 950 may also storethe determined numeric value in memory for use at step 970. At step 960,the social-networking system 160 may determine whether there is anotherone of the labels identified at step 930 to evaluate. If so, step 950 isexecuted again for the next label associated with the current comment.If there is not another label to evaluate, step 970 is executed. Step970 determines a score for the comment based on the numeric value(s) ofthe signal(s) evaluated at step 950. At step 980, the social-networkingsystem 160 may determine whether there is another comment to evaluate,e.g., another comment in the set. If so, step 930 is executed for thenext comment. If not, step 990 is executed. At step 990, thesocial-networking system 160 may determine an ordering of the commentsbased on the respective scores. For example, step 990 may sort thecomments by their scores, as described above with reference to FIGS. 5Aand 5B. At step 995, the social-networking system 160 may present eachcomment that has a score satisfying a threshold value to the user. Thecomments may be presented in order according to the determined ordering.

Particular embodiments may repeat one or more steps of the method ofFIG. 9, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 9 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 9 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for rankingand filtering comments based on the author-related and content-relatedfeatures of the comments including the particular steps of the method ofFIG. 9, this disclosure contemplates any suitable method for ranking andfiltering comments based on the author-related and content-relatedfeatures of the comments including any suitable steps, which may includeall, some, or none of the steps of the method of FIG. 9, whereappropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 9, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 9.

In particular embodiments, the social-networking system 160 may retrievea plurality of comments associated with a content object. For example,the comments may have been submitted by users of the social-networkingsystem 160 as responses to a post. The comments may be retrieved by aserver 162 from a data store 164 hosted by the social-networking system160.

In particular embodiments, the social-networking system 160 maydetermine one or more labels for each of the comments, where the labelsfor each comment are determined by a text classifier based on contentassociated with the comment. In particular embodiments, thesocial-networking system 160 may determine one or more labels for eachof the comments by applying a classifier algorithm to each comment todetermine the one or more labels, where the classifier algorithm istrained to identify the one or more labels. FIG. 12 illustrates anexample comment classifier 1202. The comment classifier 1202 may receivea comment 1212 and identify one or more labels 1216 under which thecomment 1212 may be classified with confidence 1218. The commentclassifier 1202 may be implemented in computer program code thatexecutes on a computer system or the like, e.g., on the server 162. Thecomment classifier 1202 may include a machine-learning model 1204 toidentify the labels 1216 that correspond to the comment 1212 accordingto criteria determined from training comments 1214, which may beassociated with labels for training the machine-learning model 1204.

In particular embodiments, the machine-learning model uses label featureextractors 1206 associated with each label that define how to extractfeatures from the comment 1212 that can be used to determine whether thelabel applies to the comment 1212. The feature extractors 1206 mayinclude a feature extractor specific to each label, e.g., an EloquentFeature Extractor for the Eloquent label, and so on for the Anecdotal,Descriptive, and Promotional labels. Additional labels may be recognizedby adding additional feature extractors. The feature extractors 1206 maydetermine features such as grammar quality (e.g., for the eloquentlabel), presence of particular types of words (e.g., for the anecdotallabel), and so on from the comment 1212 as appropriate to determinewhether the label applies to the comment. Prior to using the commentclassifier 1202 to identify labels 1216, the classifier 1202 may betrained using manual labeling by a trainer 1210, e.g., a human user whocan determine whether particular labels apply to particular comments.The classifier 1202 includes a training interface 1208, which receivesthe training comments 1214 (which may include correct labels).

In particular embodiments, the training interface 1208 may train themachine-learning model 1204 using the training comments 1214, and maypresent questions to the trainer 1210, e.g., by making guesses as towhich labels apply to which comments, to determine the accuracy of theguesses. The trainer 1210 may make judgments as to what qualifies asrelevant, eloquent, etc., and so on based on a set of guidelines, andprovides answers to the questions, e.g., yes/no answers or scores in therange 1-5 that rate the quality of the guesses. The training interface1208 further trains the machine-learning model 1204 based on thetrainer's answers. Once the machine-learning model 1204 has beentrained, it may be supplied with a comment 1212 for which a ranking isbeing determined, and predicts one or more labels 1216 that apply to thecomment 1212 with confidence 1218. The confidence 1218 may be, e.g., afloating-point value in the range 0 . . . 1, or a number in the range 1. . . 5, or the like.

To determine whether the eloquent label applies to the comment 1212, theeloquent feature extractor (or, alternatively, a labeling processseparate from the comment classifier 1202) may use grammar correction tocorrect the text of the comment 1212. The grammar of the corrected textis compared to that of the uncorrected text. The more similar thecorrected and uncorrected text are, the more eloquent the content. Thecomment classifier 1202 may indicate that the Eloquent label applies tothe comment 1212 if the similarity is greater than a threshold value,e.g., 0.75 on a scale of 0 to 1. The degree of similarity is a degree towhich the label 1212 applies to the comment 1212. Alternatively, thecomment classifier 1202 may output the Eloquent label as label 1216, andthe degree of similarity as confidence 1218, so that a determination maylater be made as to whether the label applies to the comment based onthe confidence value 1218. Thus, the confidence value 1218 produced bythe classifier for the comment 1212 may be based on the degree ofsimilarity so that, e.g., higher quality grammar produces a higherconfidence value for the Eloquent label. The confidence value maysubsequently be used to generate a signal value proportional to theconfidence value. Alternatively, or in addition to the confidence value1218, the comment classifier 1202 may output a value indicating a degreeto which the label 1216 applies to the comment 1212.

To determine whether the anecdotal label applies to the comment 1212,the anecdotal feature extractor (or, alternatively, a labeling processseparate from the comment classifier 1202) may search the text of thecomment 1212 for personal pronouns such as she, he, we, you, they, etc.The more personal pronouns in the comment text, the more likely thecomment is anecdotal, e.g., a personal story. Thus, the confidence value1218 may be set to a value proportional to the number of personalpronouns in the comment text. The anecdotal label may be output as theoutput label 1216 if the number of personal pronouns is greater than athreshold value, e.g., 3 personal pronouns, or if the ratio of personalpronouns (e.g., the number of personal pronouns divided by the number ofwords in the comment) is greater than a threshold value, e.g., 0.2, 0.4,or the like. Alternatively, the anecdotal label may be output regardlessof the number or ratio of personal pronouns, and the confidence valuemay be used subsequently to determine if the confidence (e.g., number orratio of personal pronouns) is sufficient to apply the anecdotal labelto the comment 1212.

In particular embodiments, if the comment 1212 is in a foreign language,the comment may be translated into English, and personal pronouns may bedetected in English. Anecdotal comments are not necessarily always goodor bad. In certain circumstances, anecdotal comments may be enjoyableand of interest to the user community, and in other circumstances,anecdotal comments may be out of scope or not appropriate for thecomment thread. An attempt may be made to recognize, for a givensocial-network entity, what kind of interaction is appropriate forcorresponding community for interacting with the entity's page (orprofile). For example, anecdotal comments may be appropriate on pagesthat are related to stories or other subjective content, such as pagesthat are known to publish personal stories or anecdotes, but notappropriate on pages that publish financial news or other objectivecontent. The rankings for anecdotal comments may then be adjusted on aper-page basis. For example, the signal value for an anecdotal commentmay be set to a positive value greater than zero to up-rank anecdotalcomments for pages on which anecdotal comments are appropriate, or anegative value to down-rank anecdotal comments for pages on whichanecdotal comments are not appropriate.

To determine whether the descriptive label applies to the comment 1212,the descriptive feature extractor (or, alternatively, a labeling processseparate from the comment classifier 1202) may count the number ofadjectives and adverbs in the comment, and set a descriptive signalvalue proportional to that count. As another example, the presence ofwords known to be used in descriptive, ornate, or flowery language maybe used as a descriptive feature that indicates the comment is likelydescriptive. As another example, if the comment has good grammar andcontains many different adjectives and nouns (e.g., at least 50% of thewords in the text are unique nouns or adjectives), then the comment islikely descriptive.

To determine whether the promotional label applies to the comment 1212,the promotional feature extractor (or, alternatively, a labeling processseparate from the comment classifier 1202) the presence of words knownto be used in promotional language may be used as an promotional featurethat indicates the comment is likely promotional. As another example,the comment may be evaluated by a spam filter. If the comment is likelyto be spam, then it is also likely to be promotional.

In particular embodiments, the social-networking system 160 maydetermine a score for each of the comments, where the score is based onone or more signals associated with the comment, and the signals arerelated to the labels associated with the comment. As described withreference to FIG. 4A, a comment's ranking score may be a sum of thesignal values that are based on the comment, and each of the labelsidentified for a comment by the comment classifier 1202 may be mapped toa positive or negative signal value. Thus the signal value(s) used toscore a comment may be based on the label(s) identified for the comment.

As an example and not by way of limitation, labels that denote positivequalities, such as the Eloquent and Descriptive labels, may be mapped topositive signal values that contribute to raising the comment's rankingscore. Each label that denotes positive qualities, such as the eloquentand descriptive labels, may be mapped to a static signal value that is 0if the label does not apply to the comment, or a constant positive valueif the label does apply to the comment. (optionally, with at least athreshold confidence, such as 0.75 or 0.9 confidence). For example, theeloquent label may be mapped to an eloquent signal that is 0 for acomment if the eloquent label does not apply to the comment, or apositive value (e.g., 0.1, 0.4, or other appropriate value) if theeloquent label does apply to the comment. Signals corresponding to otherpositive labels, such as a descriptive signals, may be determinedsimilarly.

As an example and not by way of limitation, labels that denote negativequalities, such as the Promotional label, may be mapped to negativesignal values that contribute to lowering the comment's ranking score.Each label that denotes negative qualities, such as the promotionallabel (though promotional content is not necessarily negative in otherexamples), may be mapped to a static signal value that is 0 if the labeldoes not apply to the comment, or a constant negative value if the labeldoes apply to the comment. (optionally, with at least a thresholdconfidence, such as 0.75 or 0.9 confidence). For example, thepromotional label may be mapped to a promotional signal that is 0 for acomment if the promotional label does not apply to the comment, or anegative value (e.g., −0.1, −0.4, or other appropriate value) if thepromotional label does apply to the comment. Signals corresponding toother negative labels, such as anecdotal signals (if anecdotal commentsare considered negative), may be determined similarly.

As an example and not by way of limitation, instead of being mapped to aconstant signal value, labels may be mapped to a dynamic signal valuethat varies based on how well the label 1216 fits the comment 1212. Asan example and not by way of limitation, the signal value may be equalto or based on the confidence value 1218 produced by the commentclassifier 1202. The signal value may be positive when the label iscategorized as a positive label, or negative when the label iscategorized or as a negative label. For example, the comment classifier1202 may output the eloquent label for the comment “Man Beats Train”with a confidence 1218 of 0.8, and the eloquent label for the comment “Iread this article on uknews.com” with a confidence of 0.5. Although thestatic eloquence signal values are the same for both comments (e.g., 0.1or 0.4), the dynamic eloquence signal values depend on the confidencevalues, and are 0.8 for “Man Beats Train” and 0.5 for “I read thisarticle on uknews.com.” Signal values for other labels may be determinedin a similar manner.

In particular embodiments, the signals associated with each comment maybe based on a combination of the labels associated with the comment anddemographic information associated with the target user. The sign and/orvalue of a signal for may depend on demographic information of thetarget user. As an example and not by way of limitation, the targetuser's country of residence may determine whether a comment thatcontains the word “sale”, a noun, and the name of a country ispromotional. If the country named in the comment is the same as thetarget user's country of residence, then the comment may be more likelyto be promotional, such as an advertisement of an item for sale, anindication by the comment classifier's that the comment is promotionalmay be used in comment ranking. However, if the country named in thecomment is different from the target user's country of residence, thenthe comment may be less likely to be promotional, such as aninternational news story about a sale of an item such as a business. Inthis case, the comment is not promotional, even if the commentclassifier indicates that the promotional label applies to the comment.The promotional signal's score may then be set to zero or a smallervalue, or reduced for use in comment ranking, because of the differencebetween the country of residence and the country named in the comment.

In particular embodiments, different scores may be determined for thecomment based on different demographic information associated withdifferent target users. For example, the promotional signal value for atarget user who lives in a country named in the comment described aboveis determined by the comment classifier 1202 and is a value indicatingthat the comment is promotional, which decreases the ranking of thecomment. However, the promotional signal value for a target user whodoes not live in the country named in the comment may be set to zero sothat the ranking of the comment is not affected, or to a value thatincreases the ranking of the comment, because the comment referring toan object in or related to a different country is less likely to bepromotional.

In particular embodiments, the social-networking system 160 may tracklabel preferences of the target user. The label preferences may indicateone or more of the labels for which the target user has an affinity. Forexample, if the user particularly likes eloquent prose, then thesocial-networking system 160 may store a preference indicating that theuser has an affinity for comments labeled eloquent. When a commentlabeled eloquent is identified, the signal value may be increased by anappropriate quantity, e.g., incremented by a value such as 0.3 or 0.5or, if the signal value is positive, multiplied by a factor such as 2 or3 (up to a maximum value of 1.0).

In particular embodiments, the affinity of the target user for aparticular label may be based on interactions between the target userand comments associated with the particular label. The social-networkingsystem 160 may record the number of times that the target user likes orshares (and/or the amount of time the target user spends reading)comments, and the label(s) associated with those comments. If the numberof likes or shares, or the amount of time spent reading, exceeds arespective threshold, e.g., 10 likes or 30 aggregate minutes reading,then the social-networking system 160 may store an indication of theuser's affinity for the label(s) in the user's label preferences, sothat the signal values of comments having those labels are increased asdescribed above.

FIG. 10 illustrates an example method for ranking and filtering commentsbased on impression calculations. The method may begin at step 1010,where the social-networking system 160 may retrieve a plurality ofcomments associated with a content object such as a post. At step 1020,the social-networking system 160 may prepare to repeat the subsequentsteps (e.g., steps 1030 through 1060) for each retrieved comment. Atstep 1030, the social-networking system 160 may prepare to repeat thesubsequent step (e.g., step 1040) for each signal that is associatedwith the retrieved comment and matches criteria for selecting signals toevaluate as described with reference to any of FIGS. 6-9. Step 1030 mayidentify each signal as described with reference to FIG. 11. At step1040, the social-networking system 160 may evaluate the signalassociated with the current comment by determining a numeric value ofthe signal based on information appropriate for the type of signal, asdescribed with reference to any of FIGS. 6-9. Step 1040 may also storethe determined numeric value in memory for use at step 1060. At step1050, the social-networking system 160 may determine whether there isanother one of the signals identified at step 1030 to evaluate, e.g.,another signal that is associated with the current comment and satisfiesthe conditions specified in step 1030. If so, step 1040 is executedagain for the next signal associated with the current comment. If thereis not another signal to evaluate, step 1060 is executed. At step 1060,the social-networking system 160 may determine a score for the commentbased on the numeric values of the signals evaluated at step 1040 andfurther based on a qualitative analysis of each of one or moreimpressions related to the comment. Each of the impressions may includean interaction by a historical user with the comment, and the impressionmay be used to determine the score for the comment as further describedwith reference to FIG. 13. At step 1070, the social-networking system160 may determine whether there is another comment to evaluate, e.g.,another comment in the set. If so, step 1030 is executed for the nextcomment. If not, step 1080 is executed. At step 1080, thesocial-networking system 160 may determine an ordering of the commentsbased on the respective scores. At step 1090, the social-networkingsystem 160 may filter the comments according to filtering criteria anddisplay the filtered comments in the determined order.

Particular embodiments may repeat one or more steps of the method ofFIG. 10, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 10 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 10 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates an example method for rankingand filtering comments based on the author-related and content-relatedfeatures of the comments including the particular steps of the method ofFIG. 10, this disclosure contemplates any suitable method for rankingand filtering comments based on the author-related and content-relatedfeatures of the comments including any suitable steps, which may includeall, some, or none of the steps of the method of FIG. 10, whereappropriate. Furthermore, although this disclosure describes andillustrates particular components, devices, or systems carrying outparticular steps of the method of FIG. 10, this disclosure contemplatesany suitable combination of any suitable components, devices, or systemscarrying out any suitable steps of the method of FIG. 10.

In particular embodiments, the social-networking system 160 may retrievea plurality of comments 1320 associated with a content object such as apost 304. The comments 1320 are displayed in a region of a userinterface 1302. The comments 1320 may, for example, be submitted byusers of the social-networking system 160 as responses to the post 304.Previously-submitted comments 1320 may be retrieved by a server 162 froma data store 164 hosted by the social-networking system 160.

In particular embodiments, the social-networking system 160 maydetermine a score for each of a plurality of comments. The score foreach comment in the plurality of comments may be based on one or moresignals associated with the comment. The signals may be determined usingany of the techniques described herein with reference to FIGS. 5A-C andthe flowcharts of FIGS. 6-9, e.g., based on the comment author, content,audience, and labelling, and/or user feed interaction history.

In particular embodiments, the score for each comment may be furtherbased on a qualitative analysis of each of one or more impressionsrelated to the comment, as illustrated in the flowchart of FIG. 10. Eachof the impressions may include an interaction by a user with thecomment. FIG. 13 illustrates an example of a user interface 302 thatincludes user interface elements via which a target user 360 mayinteract with one or more posts 304 and with one or more comments 1320.The user interface 302 may be presented by a web browser 132 or nativeapplication on a display of the client system 130. As an example and notby way of limitation, the target user 360 may use the user interface 302to view the post 304 and the comments 320. The target user 360 may alsouse an input device of the client system 130, such as a touch screen,mouse, keyboard, or the like, to provide input to the user interface 302to perform actions related to the comment 1320, e.g., by selecting oneof the elements of the user interface, such as a comment text field inwhich the comment text 340 is displayed, a video content player 1350,up-rank and down-rank buttons 1356, 1358, and minimize and maximizebuttons 1352, 1354. The elements of the user interface 302 also includeaction menu 1326, which displays the names of actions, e.g., Like,Reply, Remove, and so on, which may be selected by the target user 360to perform the respective social network actions, e.g., liking, replyingto, or removing a post.

In particular embodiments, an impression may be an interaction 362between a target user 360 and the comment 1320. The target user 360 mayinteract with the comment 1320 via the user interface 1302 of a clientsystem 130 (e.g., a mobile device or other computer system). Theinteraction 362 may include displaying the comment 1320 for viewing bythe target user 360. For example, the comment text 340 and other commentcontent, such as a video 1350, may be displayed on the client system130. The interaction 362 may also include receiving input related to thecomment 1320 from the user. For example, the comment text 340 may bedisplayed in an editable input field that can receive text input fromthe user. The other elements of the user interface 1302, such as theaction menu 1326, a comment up-rank button 1356 and down-rank button1358, a comment minimize element button 1352 and maximize button 1352, a“Show more comments” button 328, may be selected by the user to causecorresponding actions to occur. For example, a user may select a Likeoption from the action menu 1326 to like the comment 1320, or the usermay select the down-rank button 1358 to move the comment down to a lowerranking in the list of comments associated with the post 304.

As introduced above, the score for each comment may be based on aqualitative analysis of each of one or more impressions related to thecomment, and each of the impressions may include an interaction 362 by auser with the comment. The interactions 362 on which the score is basedmay be interactions that occurred in the past between a user 360 and thecomment 1326. When a comment is being viewed or interacted with, theuser who is interacting with the comment may be referred to as a “targetuser.” Upon completion of the interaction, a record of the interactionis stored in an entry in the interaction log. The interaction log entrymay include a comment identifier identifying the comment, and a useridentifier identifying the historical user who interacted with thecomment. Other information may be included in the log entry.

For example, each interaction 360 between the target user 360 and anelement in the user interface 320 related to the comment 320 may bestored in the comment interaction log 1318 in a format such as (user,comment identifier, interaction type, interaction parameters). As shownin FIG. 13, the comment interaction log 1318 may be stored separatelyfrom the user interaction log 1118 that stores feed interactions.Alternatively, the comment interactions 362 may be stored in the userinteraction log 1118 or other appropriate data store.

The client system 130 may record the interactions in an interaction log.Since the interactions in the log occurred in the past, the usersidentified in the log entries are referred to as historical users.Interactions 360 between the target user and the comments 320 may bestored in the log when, for example, a score is computed for the comment320. The comment interaction log 1318 may be similar to the userinteraction log 1118 that stores feed interactions, as described abovewith reference to FIG. 11, but the comment interaction log 1318 storesthe interactions 360 between the target user 360 and the user interfaceelements of the comment 1320.

The comment interaction log 1318 includes a first entry 1370 (Jake,1320, Click link, uknews.com), which represents an interaction by theuser Jake with the comment 1320 in which Jake clicked (e.g., selected)the link “uknews.com.” In this example, the clicked link “uknews.com” isan additional parameter associated with the Click link interaction. Asecond log entry 1372 (Jake, 1320, Navigate away from comment)represents an interaction by Jake with the comment 1320, in which Jakenavigated away from the comment (e.g., by clicking the link“uknews.com”, though navigation away from a comment may occur in othercases, e.g., when the user closes the web browser or clicks a backbutton of the browser to leave the web page). A third log entry 1374(Sarah, 330, Mouseover comment) represents an interaction by the userSarah with the comment 330 in which Sarah moved a mouse pointer over thecomment 330. A fourth log entry 1376 (Sarah, 330, Liked) represents aninteraction by Sara with the comment 330 in which Sarah Liked thecomment 330.

In particular embodiments, each entry in the comment interaction log1318 may include a timestamp, which can be used to determine the lengthof time between successive interactions. For example, the elapsed timethat Sarah spent reading the comment 330 may be determined bysubtracting the timestamp of Sarah's Liked interaction from thetimestamp of Sarah's Mouseover comment interact 1376. As anotherexample, two interaction log entries that are results of the same useraction may both have the same timestamp. Thus, if the entries for Jakeclicking the link “uknews.com” 1370 and Jake navigating away from thecomment 1372 were generated as a result of Jake clicking the“uknews.com” link, then both entries may be assigned the same timestamp.

There may be one or more categories of interactions, and the qualitativeanalysis may determine the category of interaction for each impression.The category of interaction for an impression may be determined based onthe user input received in the interaction 362, such as the inputreceived from the input device of the client system 130, such as touchscreen input, mouse input, keyboard input, or the like. For example, ifthe input is a mouse cursor position located at coordinates thatcorrespond to the coordinates on which the comment 1320 is displayed onthe screen of the client system, then the category of interaction may beidentified as a mouseover with respect to the comment 1320.

In particular embodiments, a score for each comment 1320 may bedetermined based on a number of interactions with the comment 1320. Theinteractions may be divided into three categories: interactions thatindicate the user is interacting with the comment, interactions thatindicate the user is imminently stopping interactions with the comment,and interactions that indicate the user has previously stoppedinteraction with the comment. Interactions in the first two categoriesmay increase the comment's score, e.g., by a value such as 0.2 for thefirst category and 0.1 for the second category, or other appropriatescore value. Interactions in the third category may have no effect onthe comment's score.

In particular embodiments, as introduced above, interactions in certaincategories may indicate that a user is interacting with the comment andhas not moved on to interacting with something other than the comment.In this case, the score of the comment may be incremented, e.g., by afirst value such as 0.2. Interactions in this category include thefollowing:

-   -   A mouseover with respect to the comment 1320—if the input is a        mouse cursor position located at coordinates that correspond to        the coordinates on which the comment 1320 is displayed on the        screen of the client system, then the category of interaction        may be identified as a mouseover with respect to the comment        1320.    -   User input requesting expansion of the comment 1320—may be        identified by received user input that includes a mouse click on        a comment expansion icon 1354 displayed for the comment 1320.    -   Clicking on a media item embedded in the comment—may be        identified by user input that selects a media item such as the        video 1350.    -   Clicking on a link in the comment—may be identified by user        input that includes a mouse click associated with the        coordinates of a link, such as the mouse click 1360 on the link        “unknews.com” in the comment 1340.    -   Submitting a reply to the comment—may be identified by user        input that includes a mouse click on the word “Reply” in the        action menu 1326.    -   Indicating a Like for the comment—may be identified by user        input that includes a mouse click on the word “Like” in the        action menu 1326.    -   Up-ranking or rating the comment positively—may be identified by        user input that includes a mouse click on a comment up-rank icon        1356 or a Rate action in the action menu 1326 that rates the        comment at or above 50%. For this interaction, a degree of the        interaction may be set to a positive value proportional to the        number of positions by which the comment is down-ranked, or to        the rating.    -   Down-ranking or rating the comment negatively—may be identified        by user input that includes a mouse click on a comment down-rank        icon 1358 or a Rate action in the action menu 1326 that rates        the comment below 50%. For this interaction, a degree of the        interaction may be set to a negative value proportional to the        number of positions by which the comment is down-ranked, or to        the rating.    -   Hiding the comment—may be identified by user input that includes        a mouse click on the word “Hide” in the action menu 1326.    -   Requesting metadata associated with the comment—may be        identified by user input that includes a mouse click on the word        “Details” in the action menu 1326.    -   Saving a media item embedded in the comment or saving an        attachment to the comment—These categories may be identified by        user input that includes a right mouse click on the video        content item 1350, or on an attachment to the comment (not        shown), respectively, and selection of a Save menu item from a        menu that appears in response to the right mouse click.    -   Sharing the comment—may be identified by user input that        includes a mouse click at coordinates of the word “Share        respectively in the action menu 1326.    -   Scrolling down within the comment—may be detected by user input        that scrolls the comment down (e.g., selection of a scroll bar        located along an edge of the comment text 340, or a touch scroll        gesture on the text input field 340, so that the comment at        least partially disappears.    -   Highlighting a portion of the comment—may be identified by user        input that selects one or more characters of the comment text        340 in the comment text input field.    -   Maintaining display of at least a portion of the comment after        another interaction with the comment—may be identified by        identifying, in the comment interaction log, a first interaction        with the comment 1320 followed by absence of another interaction        (that would indicate the comment is no longer displayed) for at        least a threshold period of time. Alternatively, this category        may also be identified by an occurrence of a second interaction        with the comment 1320 subsequent to the first interaction.

In particular embodiments, as introduced above, interactions in certaincategories may indicate that the user is stopping interaction with thecomment, e.g., the interaction is with the comment, but is the lastinteraction with the comment prior to an interaction with somethingelse. In this case, the score of the comment may be incremented, e.g.,by a second value such as 0.1 that is less than the first value, but notnecessarily zero. Such categories of interaction may include navigatingaway from the comment. This category of interaction may be identified byuser input that selects a user interface element of a different comment330, such as an item on an actions menu of another comment 330, or byuser input that selects a UI element of a the post 304 or another post,or by user input that selects a user interface element that is not partof the comment 1320. This category of interaction may also be identifiedby a user selecting or clicking a navigation button of the web browseror application, such as a Back button. This category of interaction mayalso be identified by scrolling away from the comment so that thecomment at least partially disappears, or completely disappears. Thiscategory of interaction may also be identified by receiving input thatswitches the client application's content, e.g., by switching to adifferent window, screen, or page of the application on which thecomment is not displayed. The client application may be a web browser,mobile application, or other application located on the client system.This category of interaction may also be identified by receiving inputthat sends the client application to the background. This category ofinteraction may be determined by user input that selects a userinterface element of the comment 1320 that causes navigation away fromthe comment, such as the link uknews.com of the text 340, which causesnavigation to the uknews.com link. As another example, this category maybe determined by user selection of a link to a page that is unrelated tothe comment 1320, but selection of a link to a page that is related tothe comment 1320 may not be in this category, since selection of arelated page may be considered to be continued interest in the commentby the user.

In particular embodiments, as introduced above, interactions in certaincategories may indicate that the user has previously stopped interactionwith the comment, e.g., the interaction is with something other than thecomment. In this case, the score of the comment may be unchanged, sincethere is no interaction with the comment in this case. These categoriesof interaction may include terminating the application. This category ofinteraction may be detected by input that selects a Quit option from amenu of the application, closes the application's window, or otherwisecloses the application. As the application may be unable to create anycomment log entries after terminating, the absence of a log entry for athreshold period of time, e.g., 5 seconds, 30 seconds, or the like, mayindicate that the application has terminated. As another example,termination of the application may be detected when the client system'sdisplay is powered off, or the client system itself is powered off.

In particular embodiments, interactions in certain categories may beused to determine an amount of time the target user has spent viewing acomment. A score for the comment may then be determined based on thetime that users have spent viewing the comment. An interaction thatindicates the user is viewing the comment may indicate a start time(which may be specific to the comment and user). An interaction thatindicates the user is leaving or otherwise no longer viewing the commentmay indicate a stop time. The time spent on the comment by the user maythen be determined by identifying each stop time in the log and, foreach stop time, searching backwards in logged time for the earlieststart time associated with the comment and user, such that there are nostop times between the earliest start time and the identified stop time.A sum of the time spent by all users who have interacted with thecomment may be determined for a certain time period (e.g., the pasthour, the current day, the past 5 days, or the like). The sum of timespent by all users may then be used as a ranking score for the comment,so that the comment having the highest total time spent by users isranked higher than all other comments evaluated for the time period.Alternatively, the time spent on a comment may be represented as adegree of interaction, and a total value of the degree of interactionmay be calculated for the comment and used as the basis for determiningthe comment's ranking position.

In particular embodiments, the qualitative analysis may determine adegree of interaction for each of the impressions. The degree ofinteraction may include how quickly the interaction took place, whetherthe interaction was retracted, edited, or deleted, whether thehistorical user repeated the interaction. For example, the degree ofinteraction may be based on an amount of elapsed time between a user'sselection of a comment for viewing and the user's subsequent selectionof a back button or other user interface feature that retracts theuser's selection of the comment. As an example, if the amount of elapsedtime is less than a threshold value, e.g., less than 1 second, less than2 seconds, or the like, then the user's selection of the comment may beassigned a degree that tis small or zero. If the amount of elapsed timeis greater than the threshold, then the comment may be assigned a degreevalue proportional to the amount of elapsed time. How quickly theinteraction took place may be determined based on the amount of time auser spent interacting with a graphical user interface element, such asa scrollbar of the content text window. For example, the degree may beproportional to the amount of time the user spent scrolling through thecomment text. The degree of interaction may also include howquickly/soon the interaction was retracted, edited, or deleted, by whomthe interaction was retracted, edited, or deleted. That is, whether theinteraction was retracted, edited, or deleted by the historical user,the comment posting user, or an administrator.

In particular embodiments, the category of interaction for theimpression may include user input submitting a reply to the comment, andthe qualitative analysis may assess a degree of quality of the reply.That is, the quality of the reply may be used as a basis for determininga degree of the reply interaction. As an example and not by way oflimitation, if the reply is generic, e.g., not related to the comment1320, contains text known to be used in generic replies (e.g., “?”,“LOL”, “thanks”, “yes”, “no”, emoji, and so on) then the comment'sdegree may be decreased by a fixed value such as 0.1, or by a valueproportional to the brevity or length of the comment. The degree of arepetitive comment, e.g., having text that repeats words and/or phrases,may also be reduced by a fixed value or by a value proportional to thenumber of repeated words and/or phrases. Conversely, the degree of acomment that is thoughtful or detailed may be increased by a constantvalue or by a value proportional to the comment's length or detail.

In particular embodiments, the impressions may comprise a viewingimpression that comprises an interaction associated with viewing thecomment and a navigation impression that comprises an interactionassociated with navigation away from the comment, and the degree ofinteraction comprises an amount of elapsed time between the interactionassociated with viewing the comment and the interaction associated withnavigation away from the comment. The elapsed time may correspond to anamount of time the user spent viewing the comment prior to navigatingaway from the comment.

In particular embodiments, determining the score may be based at leastin part on a collective qualitative analysis of a subset of theimpressions for the comment. That is, the score may be determined basedon selected impressions for the comment. The subset of impressions mayshare a common property, such as impressions that were interacted withby friends of the target user, by users who have an affinity with thetarget user (the affinity satisfying a threshold level of affinity), byusers who share a user-designated interest with the target user, byusers who belong to a group, or by users who share one or moredemographic traits, e.g., age group, city of residence, nationality, andthe like. The collective qualitative analysis may be based on a numberof different types of interactions for the impressions in the subset.The subset of impressions may include one or more impressions havingtimestamps within a threshold recent period of time.

In particular embodiments, the subset of impressions may include aviewing impression that includes an interaction associated with viewingthe comment and a navigation impression that includes an interactionassociated with navigation away from the comment, and the navigationinteraction may occur at least a threshold time after the viewinginteraction. The threshold time may correspond to an amount of time theuser spent viewing the comment prior to navigating away from thecomment.

In particular embodiments, the subset of impressions may include one ormore impressions satisfying a threshold degree of interaction, or one ormore impressions within a particular category of interaction. That is,the subset may include one or more of the impressions for which a usernode representing the historical user is connected to a user noderepresenting the target user by one or more edges in a social graph fora social-networking system. The subset may include one or more of theimpressions for which a calculation of affinity between the historicaluser and the target user satisfies a threshold level of affinity, or thesubset may include one or more of the impressions for which thehistorical user and the target user share a user-designated interest,both belong to a group, or share one or more demographic traits. Thesubset may include one or more of the impressions for which both thehistorical user and the target user have been invited to an event. Thesubset may include one or more of the impressions having a timestampwithin a threshold recent period of time, one or more impressionssatisfying a threshold degree of interaction, or one or more impressionswithin a particular category of interaction.

The subset may include one or more of the impressions for which both thehistorical user and the target user are identified as participants in anevent. The event may be a representation of a real-world event, e.g., aconference, music performance, festival, or other real-world event thatsocial-network users may attend. The subset may include one or more ofthe impressions for which both the historical user and the target userare verified as having attended an event. The subset may include one ormore of the impressions for which both the historical user and thetarget user have indicated interest in an event, e.g., by following anevent page, registering for the event, mentioning or referring to theevent in a post or comment, or otherwise interacting with the eventpage.

FIG. 14 illustrates an example computer system 1400. In particularembodiments, one or more computer systems 1400 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 1400 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 1400 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 1400.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems1400. This disclosure contemplates computer system 1400 taking anysuitable physical form. As example and not by way of limitation,computer system 1400 may be an embedded computer system, asystem-on-chip (SOC), a single-board computer system (SBC) (such as, forexample, a computer-on-module (COM) or system-on-module (SOM)), adesktop computer system, a laptop or notebook computer system, aninteractive kiosk, a mainframe, a mesh of computer systems, a mobiletelephone, a personal digital assistant (PDA), a server, a tabletcomputer system, or a combination of two or more of these. Whereappropriate, computer system 1400 may include one or more computersystems 1400; be unitary or distributed; span multiple locations; spanmultiple machines; span multiple data centers; or reside in a cloud,which may include one or more cloud components in one or more networks.Where appropriate, one or more computer systems 1400 may perform withoutsubstantial spatial or temporal limitation one or more steps of one ormore methods described or illustrated herein. As an example and not byway of limitation, one or more computer systems 1400 may perform in realtime or in batch mode one or more steps of one or more methods describedor illustrated herein. One or more computer systems 1400 may perform atdifferent times or at different locations one or more steps of one ormore methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 1400 includes a processor1402, memory 1404, storage 1406, an input/output (I/O) interface 1408, acommunication interface 1410, and a bus 1412. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 1402 includes hardware forexecuting instructions, such as those making up a computer program. Asan example and not by way of limitation, to execute instructions,processor 1402 may retrieve (or fetch) the instructions from an internalregister, an internal cache, memory 1404, or storage 1406; decode andexecute them; and then write one or more results to an internalregister, an internal cache, memory 1404, or storage 1406. In particularembodiments, processor 1402 may include one or more internal caches fordata, instructions, or addresses. This disclosure contemplates processor1402 including any suitable number of any suitable internal caches,where appropriate. As an example and not by way of limitation, processor1402 may include one or more instruction caches, one or more datacaches, and one or more translation lookaside buffers (TLBs).Instructions in the instruction caches may be copies of instructions inmemory 1404 or storage 1406, and the instruction caches may speed upretrieval of those instructions by processor 1402. Data in the datacaches may be copies of data in memory 1404 or storage 1406 forinstructions executing at processor 1402 to operate on; the results ofprevious instructions executed at processor 1402 for access bysubsequent instructions executing at processor 1402 or for writing tomemory 1404 or storage 1406; or other suitable data. The data caches mayspeed up read or write operations by processor 1402. The TLBs may speedup virtual-address translation for processor 1402. In particularembodiments, processor 1402 may include one or more internal registersfor data, instructions, or addresses. This disclosure contemplatesprocessor 1402 including any suitable number of any suitable internalregisters, where appropriate. Where appropriate, processor 1402 mayinclude one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 1402. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 1404 includes main memory for storinginstructions for processor 1402 to execute or data for processor 1402 tooperate on. As an example and not by way of limitation, computer system1400 may load instructions from storage 1406 or another source (such as,for example, another computer system 1400) to memory 1404. Processor1402 may then load the instructions from memory 1404 to an internalregister or internal cache. To execute the instructions, processor 1402may retrieve the instructions from the internal register or internalcache and decode them. During or after execution of the instructions,processor 1402 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor1402 may then write one or more of those results to memory 1404. Inparticular embodiments, processor 1402 executes only instructions in oneor more internal registers or internal caches or in memory 1404 (asopposed to storage 1406 or elsewhere) and operates only on data in oneor more internal registers or internal caches or in memory 1404 (asopposed to storage 1406 or elsewhere). One or more memory buses (whichmay each include an address bus and a data bus) may couple processor1402 to memory 1404. Bus 1412 may include one or more memory buses, asdescribed below. In particular embodiments, one or more memorymanagement units (MMUs) reside between processor 1402 and memory 1404and facilitate accesses to memory 1404 requested by processor 1402. Inparticular embodiments, memory 1404 includes random access memory (RAM).This RAM may be volatile memory, where appropriate Where appropriate,this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 1404 may include one ormore memories 1404, where appropriate. Although this disclosuredescribes and illustrates particular memory, this disclosurecontemplates any suitable memory.

In particular embodiments, storage 1406 includes mass storage for dataor instructions. As an example and not by way of limitation, storage1406 may include a hard disk drive (HDD), a floppy disk drive, flashmemory, an optical disc, a magneto-optical disc, magnetic tape, or aUniversal Serial Bus (USB) drive or a combination of two or more ofthese. Storage 1406 may include removable or non-removable (or fixed)media, where appropriate. Storage 1406 may be internal or external tocomputer system 1400, where appropriate. In particular embodiments,storage 1406 is non-volatile, solid-state memory. In particularembodiments, storage 1406 includes read-only memory (ROM). Whereappropriate, this ROM may be mask-programmed ROM, programmable ROM(PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM),electrically alterable ROM (EAROM), or flash memory or a combination oftwo or more of these. This disclosure contemplates mass storage 1406taking any suitable physical form. Storage 1406 may include one or morestorage control units facilitating communication between processor 1402and storage 1406, where appropriate. Where appropriate, storage 1406 mayinclude one or more storages 1406. Although this disclosure describesand illustrates particular storage, this disclosure contemplates anysuitable storage.

In particular embodiments, I/O interface 1408 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 1400 and one or more I/O devices. Computersystem 1400 may include one or more of these I/O devices, whereappropriate. One or more of these I/O devices may enable communicationbetween a person and computer system 1400. As an example and not by wayof limitation, an I/O device may include a keyboard, keypad, microphone,monitor, mouse, printer, scanner, speaker, still camera, stylus, tablet,touch screen, trackball, video camera, another suitable I/O device or acombination of two or more of these. An I/O device may include one ormore sensors. This disclosure contemplates any suitable I/O devices andany suitable I/O interfaces 1408 for them. Where appropriate, I/Ointerface 1408 may include one or more device or software driversenabling processor 1402 to drive one or more of these I/O devices. I/Ointerface 1408 may include one or more I/O interfaces 1408, whereappropriate. Although this disclosure describes and illustrates aparticular I/O interface, this disclosure contemplates any suitable I/Ointerface.

In particular embodiments, communication interface 1410 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 1400 and one or more other computer systems 1400 or oneor more networks. As an example and not by way of limitation,communication interface 1410 may include a network interface controller(NIC) or network adapter for communicating with an Ethernet or otherwire-based network or a wireless NIC (WNIC) or wireless adapter forcommunicating with a wireless network, such as a WI-FI network. Thisdisclosure contemplates any suitable network and any suitablecommunication interface 1410 for it. As an example and not by way oflimitation, computer system 1400 may communicate with an ad hoc network,a personal area network (PAN), a local area network (LAN), a wide areanetwork (WAN), a metropolitan area network (MAN), or one or moreportions of the Internet or a combination of two or more of these. Oneor more portions of one or more of these networks may be wired orwireless. As an example, computer system 1400 may communicate with awireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FInetwork, a WI-MAX network, a cellular telephone network (such as, forexample, a Global System for Mobile Communications (GSM) network), orother suitable wireless network or a combination of two or more ofthese. Computer system 1400 may include any suitable communicationinterface 1410 for any of these networks, where appropriate.Communication interface 1410 may include one or more communicationinterfaces 1410, where appropriate. Although this disclosure describesand illustrates a particular communication interface, this disclosurecontemplates any suitable communication interface.

In particular embodiments, bus 1412 includes hardware, software, or bothcoupling components of computer system 1400 to each other. As an exampleand not by way of limitation, bus 1412 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 1412may include one or more buses 1412, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,feature, functions, operations, or steps, any of these embodiments mayinclude any combination or permutation of any of the components,elements, features, functions, operations, or steps described orillustrated anywhere herein that a person having ordinary skill in theart would comprehend. Furthermore, reference in the appended claims toan apparatus or system or a component of an apparatus or system beingadapted to, arranged to, capable of, configured to, enabled to, operableto, or operative to perform a particular function encompasses thatapparatus, system, component, whether or not it or that particularfunction is activated, turned on, or unlocked, as long as thatapparatus, system, or component is so adapted, arranged, capable,configured, enabled, operable, or operative. Additionally, although thisdisclosure describes or illustrates particular embodiments as providingparticular advantages, particular embodiments may provide none, some, orall of these advantages.

What is claimed is:
 1. A method, comprising: by one or more computersystems, retrieving a plurality of comments associated with a contentobject; by the one or more computer systems, determining a score foreach of the comments, wherein the score is based on one or more signalsassociated with the comment, and wherein the score is further based on aqualitative analysis of each of one or more impressions related to thecomment, and wherein each of the impressions comprises an interaction bya historical user with the comment, wherein determining the score foreach of the comments comprises: identifying a stop time associated withthe comment and the historical user in an interaction log, wherein thestop time is indicated by an interaction associated with the historicaluser leaving or no longer viewing the comment, searching the interactionlog backwards in logged time to identify a start time associated withthe comment and the historical user, wherein the start time is indicatedby an earliest interaction associated with the historical user viewingthe comment, determining a viewing time of the comment based on thestart time and the stop time, and determining sum of viewing time by allhistorical users who have interacted with the comment for certain timeperiod, wherein the score for the comment is based on the sum of viewingtime of the comment; by the one or more computer systems, ordering thecomments based on the respective scores; and by the one or more computersystems, presenting one or more of the ordered comments to a targetuser.
 2. The method of claim 1, wherein the qualitative analysisdetermines a category of interaction for the impression, the score isbased at least in part on the category of interaction, and wherein thecategory of interaction comprises user input related to the comment. 3.The method of claim 2, wherein the user input comprises one or more of:user input requesting expansion of the comment, indicating a mouseoverwith respect to the comment, clicking on a media item embedded in thecomment, clicking on a link in the comment, submitting a reply to thecomment, indicating a like for the comment, ranking the comment, ratingthe comment, hiding the comment, requesting metadata associated with thecomment, saving a media item embedded in the comment, saving anattachment to the comment, sharing the comment, tagging the comment,scrolling down within the comment, highlighting a portion of thecomment, maintaining display of at least a portion of the comment afteranother interaction with the comment, navigating away from the comment,or terminating an application.
 4. The method of claim 1, wherein thecategory of interaction for the impression comprises user inputsubmitting a reply to the comment, and wherein the qualitative analysisassesses a degree of quality of the reply.
 5. The method of claim 1,wherein the qualitative analysis determines a degree of interaction foreach of the impressions, and wherein the degree of interaction compriseswhether the interaction was retracted, edited, or deleted, or whetherthe historical user repeated the interaction.
 6. The method of claim 5,wherein the impressions comprise a viewing impression that comprises aninteraction associated with viewing the comment and a navigationimpression that comprises an interaction associated with navigation awayfrom the comment, and the degree of interaction comprises an amount ofelapsed time between the interaction associated with viewing the commentand the interaction associated with navigation away from the comment. 7.The method of claim 1, wherein the qualitative analysis comprises acollective qualitative analysis of a subset of the impressions relatedto the comment.
 8. The method of claim 7, wherein the collectivequalitative analysis comprises applying weights to the qualitativeanalyses of the impressions in the subset.
 9. The method of claim 7,wherein the subset comprises one or more of the impressions for which auser node representing the historical user is connected to a user noderepresenting the target user by one or more edges in a social graph fora social-networking system.
 10. The method of claim 7, wherein thesubset comprises one or more of the impressions for which a calculationof affinity between the historical user and the target user satisfies athreshold level of affinity.
 11. The method of claim 7, wherein thesubset comprises one or more of the impressions for which the historicaluser and the target user share a user-designated interest, both belongto a group, or share one or more demographic traits.
 12. The method ofclaim 7, wherein the subset comprises one or more of the impressions forwhich both the historical user and the target user have been invited toan event, are identified as participants in an event, are verified ashaving attended an event, or have indicated interest in an event. 13.The method of claim 7, wherein the subset comprises one or more of theimpressions having a timestamp within a threshold recent period of time.14. The method of claim 7, wherein the subset comprises a viewingimpression that comprises an interaction associated with viewing thecomment and a navigation impression that comprises an interactionassociated with navigation away from the comment, and the navigationinteraction occurs at least a threshold time after the viewinginteraction.
 15. The method of claim 7, wherein the subset comprises oneor more of the impressions satisfying a threshold degree of interaction.16. The method of claim 7, wherein the subset comprises one or more ofthe impressions within a particular category of interaction.
 17. Themethod of claim 7, wherein the collective qualitative analysis is basedon a plurality of different categories of interactions for theimpressions in the subset.
 18. One or more computer-readablenon-transitory storage media embodying software that is operable whenexecuted to: retrieve a plurality of comments associated with a contentobject; determine a score for each of the comments, wherein the score isbased on one or more signals associated with the comment, and whereinthe score is further based on a qualitative analysis of each of one ormore impressions related to the comment, and wherein each of theimpressions comprises an interaction by a historical user with thecomment, wherein to determine the score for each of the comments, thesoftware is further operable when executed to: identify a stop timeassociated with the comment and the historical user in an interactionlog, wherein the stop time is indicated by an interaction associatedwith the historical user leaving or no longer viewing the comment,search the interaction log backwards in logged time to identify a starttime associated with the comment and the historical user, wherein thestart time is indicated by an earliest interaction associated with thehistorical user viewing the comment, determine a viewing time of thecomment based on the start time and the stop time, and determine sum ofviewing time by all historical users who have interacted with thecomment for certain time period, wherein the score for the comment isbased on the sum of viewing time of the comment; order the commentsbased on the respective scores; and present one or more of the orderedcomments to a target user.
 19. The media of claim 18, wherein thequalitative analysis determines a category of interaction for theimpression, the score is based at least in part on the category ofinteraction, and wherein the category of interaction comprises userinput related to the comment.
 20. A system comprising: one or moreprocessors; and a memory coupled to the processors comprisinginstructions executable by the processors, the processors being operablewhen executing the instructions to: retrieve a plurality of commentsassociated with a content object; determine a score for each of thecomments, wherein the score is based on one or more signals associatedwith the comment, and wherein the score is further based on aqualitative analysis of each of one or more impressions related to thecomment, and wherein each of the impressions comprises an interaction bya historical user with the comment, wherein to determine the score foreach of the comments, the software is further operable when executed to:identify a stop time associated with the comment and the historical userin an interaction log, wherein the stop time is indicated by aninteraction associated with the historical user leaving or no longerviewing the comment, search the interaction log backwards in logged timeto identify a start time associated with the comment and the historicaluser, wherein the start time is indicated by an earliest interactionassociated with the historical user viewing the comment, determine aviewing time of the comment based on the start time and the stop time,and determine sum of viewing time by all historical users who haveinteracted with the comment for certain time period, wherein the scorefor the comment is based on the sum of viewing time of the comment;order the comments based on the respective scores; and present one ormore of the ordered comments to a target user.